mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.14] gh-134214: Fix test case in pyrepl (gh-134223) (gh-134229)
(cherry picked from commit faebf87b37
)
Co-authored-by: Jessica Temporal <jtemporal@users.noreply.github.com>
This commit is contained in:
parent
a3c3d6f0ef
commit
7d995ea9fd
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