diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2020-12-31 18:26:00 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-01-10 09:46:18 -0500 |
commit | bd90b202587dd9f1e2e1319c1c542545c7263dd3 (patch) | |
tree | 0ea3dff2903cb5be1869dde55434e93e2677ccff /tests/test_arcs.py | |
parent | 13f15b0e4316865287d4b5ae1d4f856dac9f9ecb (diff) | |
download | python-coveragepy-git-bd90b202587dd9f1e2e1319c1c542545c7263dd3.tar.gz |
In 3.10, modules always have firstlineno==1
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r-- | tests/test_arcs.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index 849dbc4a..b927526b 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -25,6 +25,7 @@ class SimpleArcTest(CoverageTest): b = 3 """, arcz=".1 13 3.") + line1 = 1 if env.PYBEHAVIOR.module_firstline_1 else 2 self.check_coverage("""\ a = 2 @@ -32,7 +33,8 @@ class SimpleArcTest(CoverageTest): c = 5 """, - arcz="-22 23 35 5-2") + arcz="-{0}2 23 35 5-{0}".format(line1) + ) def test_function_def(self): self.check_coverage("""\ |