diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-05-11 07:24:02 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-05-11 07:57:45 -0400 |
commit | 11dcf13f48a3fd6cb21ad2e96998061d127ac2ff (patch) | |
tree | 3884434db48f841345ca0f7e38e7286f2bcf03fd /tests/test_parser.py | |
parent | 2b84823331e5db2f89d5b8ab6ac00a4447c34cf6 (diff) | |
download | python-coveragepy-git-11dcf13f48a3fd6cb21ad2e96998061d127ac2ff.tar.gz |
fix: Python3.12 now inlines comprehensions
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r-- | tests/test_parser.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py index f74420b5..d461cb6c 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -322,10 +322,11 @@ class ParserMissingArcDescriptionTest(CoverageTest): assert expected == parser.missing_arc_description(2, -2) expected = "line 3 didn't finish the generator expression on line 3" assert expected == parser.missing_arc_description(3, -3) - expected = "line 4 didn't finish the dictionary comprehension on line 4" - assert expected == parser.missing_arc_description(4, -4) - expected = "line 5 didn't finish the set comprehension on line 5" - assert expected == parser.missing_arc_description(5, -5) + if env.PYBEHAVIOR.comprehensions_are_functions: + expected = "line 4 didn't finish the dictionary comprehension on line 4" + assert expected == parser.missing_arc_description(4, -4) + expected = "line 5 didn't finish the set comprehension on line 5" + assert expected == parser.missing_arc_description(5, -5) def test_missing_arc_descriptions_for_exceptions(self) -> None: parser = self.parse_text("""\ |