summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-06-02 11:46:37 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-06-02 11:46:37 -0400
commitbcc9de734ba09c8a8849e1b614e5a51ee5568dc8 (patch)
tree12cf8a338f8186b0d16db074c311fe4146fc762b
parent6956750cb3d89646c6a7e3691fd5571286450ef5 (diff)
downloadpython-coveragepy-bcc9de734ba09c8a8849e1b614e5a51ee5568dc8.tar.gz
Undo some 3.7b4 ast tweaks
-rw-r--r--tests/test_coverage.py13
-rw-r--r--tests/test_parser.py6
2 files changed, 3 insertions, 16 deletions
diff --git a/tests/test_coverage.py b/tests/test_coverage.py
index 45abb2b..c8ac55d 100644
--- a/tests/test_coverage.py
+++ b/tests/test_coverage.py
@@ -582,12 +582,7 @@ class SimpleStatementTest(CoverageTest):
""",
[2, 3]
)
- if env.PYVERSION < (3, 7):
- # Before 3.7, module docstrings were included in the lnotab table,
- # unless they were the first line in the file?
- lines = [2, 3, 4]
- else:
- lines = [3, 4]
+ lines = [2, 3, 4]
self.check_coverage("""\
# Start with a comment, because it changes the behavior(!?)
'''I am a module docstring.'''
@@ -1147,11 +1142,7 @@ class CompoundStatementTest(CoverageTest):
[1,10,12,13], "")
def test_class_def(self):
- if env.PYVERSION < (3, 7):
- arcz="-22 2D DE E-2 23 36 6A A-2 -68 8-6 -AB B-A"
- else:
- # Python 3.7 no longer includes class docstrings in the lnotab table.
- arcz="-22 2D DE E-2 26 6A A-2 -68 8-6 -AB B-A"
+ arcz="-22 2D DE E-2 23 36 6A A-2 -68 8-6 -AB B-A"
self.check_coverage("""\
# A comment.
class theClass:
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 89ef6dc..184825b 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -165,11 +165,7 @@ class PythonParserTest(CoverageTest):
def func(x=25):
return 26
""")
- if env.PYVERSION < (3, 7):
- raw_statements = set([3, 4, 5, 6, 8, 9, 10, 13, 15, 16, 17, 20, 22, 23, 25, 26])
- else:
- # Python 3.7 no longer includes class docstrings in the lnotab table.
- raw_statements = set([3, 4, 5, 6, 8, 10, 13, 15, 16, 17, 20, 22, 23, 25, 26])
+ raw_statements = set([3, 4, 5, 6, 8, 9, 10, 13, 15, 16, 17, 20, 22, 23, 25, 26])
self.assertEqual(parser.raw_statements, raw_statements)
self.assertEqual(parser.statements, set([8]))