8000 gh-134214: Fix test case in pyrepl (gh-134223) · python/cpython@faebf87 · GitHub
[go: up one dir, main page]

Skip to content

Commit faebf87

Browse files
authored
gh-134214: Fix t 10000 est case in pyrepl (gh-134223)
1 parent cc9add6 commit faebf87

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,11 +1055,15 @@ def test_parse(self):
10551055
self.assertEqual(actual, parsed)
10561056
# The parser should not get tripped up by any
10571057
# other preceding statements
1058-
code = f'import xyz\n{code}'
1059-
with self.subTest(code=code):
1058+
_code = f'import xyz\n{code}'
1059+
parser = ImportParser(_code)
1060+
actual = parser.parse()
1061+
with self.subTest(code=_code):
10601062
self.assertEqual(actual, parsed)
1061-
code = f'import xyz;{code}'
1062-
with self.subTest(code=code):
1063+
_code = f'import xyz;{code}'
1064+
parser = ImportParser(_code)
1065+
actual = parser.parse()
1066+
with self.subTest(code=_code):
10631067
self.assertEqual(actual, parsed)
10641068

10651069
def test_parse_error(self):

0 commit comments

Comments
 (0)
0