mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-134214: Fix test case in pyrepl (gh-134223)
This commit is contained in:
parent
cc9add695d
commit
faebf87b37
1 changed files with 8 additions and 4 deletions
|
@ -1055,11 +1055,15 @@ class TestPyReplModuleCompleter(TestCase):
|
|||
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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue