8000 gh-134214: Fix test case in pyrepl by jtemporal · Pull Request #134223 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-134214: Fix test case in pyrepl #134223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Lib/test/test_pyrepl/test_pyrepl.py
5D29
Original file line number Diff line number Diff line change
Expand Up @@ -1055,11 +1055,15 @@ def test_parse(self):
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):
_code = f'import xyz\n{code}'
parser = ImportParser(_code)
actual = parser.parse()
with self.subTest(code=_code):
self.assertEqual(actual, parsed)
code = f'import xyz;{code}'
with self.subTest(code=code):
_code = f'import xyz;{code}'
parser = ImportParser(_code)
actual = parser.parse()
with self.subTest(code=_code):
self.assertEqual(actual, parsed)

def test_parse_error(self):
Expand Down
Loading
0