summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-05-01 14:15:50 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-05-01 16:24:37 -0400
commit7db98362f368ac569edf66228d52cbc64a6d69aa (patch)
tree491c7c3736ca60ceeda3d29e3f4186954e3e572a /tests/test_api.py
parent775c14a764ff3fd32bcd25d91f4c0f635722ed50 (diff)
downloadpython-coveragepy-git-7db98362f368ac569edf66228d52cbc64a6d69aa.tar.gz
refactor: remove yet more unneeded backward.py shims
Gone are: - PYC_MAGIC_NUMBER - code_object - SimpleNamespace
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 6eff06fe..42ef986d 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -17,7 +17,7 @@ import pytest
import coverage
from coverage import env
-from coverage.backward import code_object, import_local_file
+from coverage.backward import import_local_file
from coverage.data import line_counts
from coverage.files import abs_file, relative_filename
from coverage.misc import CoverageException
@@ -269,7 +269,7 @@ class ApiTest(CoverageTest):
def f1():
a = 1 # pylint: disable=unused-variable
- one_line_number = code_object(f1).co_firstlineno + 1
+ one_line_number = f1.__code__.co_firstlineno + 1
lines = []
def run_one_function(f):