-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
easytestsTests in the Lib/test dirTests in the Lib/test dirtopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
In this test:
cpython/Lib/test/test_pyrepl/test_pyrepl.py
Lines 1051 to 1063 in 605022a
for code, parsed in cases: | |
parser = ImportParser(code) | |
actual = parser.parse() | |
with self.subTest(code=code): | |
self.assertEqual(actual, parsed) | |
# The parser should not get tripped up by any | |
# other preceding statements | |
code = f'import xyz\n{code}' | |
with self.subTest(code=code): | |
self.assertEqual(actual, parsed) | |
code = f'import xyz;{code}' | |
with self.subTest(code=code): | |
self.assertEqual(actual, parsed) |
The second and third assert is not rerunning the ImportParser
so it's not actually testing anything right now.
We need to add this before each call to assert:
parser = ImportParser(code)
actual = parser.parse()
Please don't pick up this issue, I'd like to reserve it for someone at the PyConUS sprints :)
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
easytestsTests in the Lib/test dirTests in the Lib/test dirtopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error