summaryrefslogtreecommitdiff
path: root/tests/test_parser.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-10-05 07:32:08 -0400
committerNed Batchelder <ned@nedbatchelder.com>2017-10-05 07:32:08 -0400
commit14961ba86519ec98213f1315e2a94b9377db8778 (patch)
tree12b46c4df41ab8ca1e9b9a7d39b32ecf29ec89b8 /tests/test_parser.py
parenta1a683ccbfe34928e5fa4733643e3f1c8fbed015 (diff)
downloadpython-coveragepy-git-14961ba86519ec98213f1315e2a94b9377db8778.tar.gz
Python 3.7 no longer includes class docstrings in the lnotab table
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r--tests/test_parser.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index aa96b592..e9628ac7 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -165,10 +165,12 @@ class PythonParserTest(CoverageTest):
def func(x=25):
return 26
""")
- self.assertEqual(
- parser.raw_statements,
- set([3, 4, 5, 6, 8, 9, 10, 13, 15, 16, 17, 20, 22, 23, 25, 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])
+ self.assertEqual(parser.raw_statements, raw_statements)
self.assertEqual(parser.statements, set([8]))
def test_class_decorator_pragmas(self):