8000 Add a test case. · python/cpython@5101034 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5101034

Browse files
committed
Add a test case.
1 parent 1914aca commit 5101034

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Lib/test/test_types.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
run_with_locale, cpython_only, no_rerun,
55
MISSING_C_DOCSTRINGS,
66
)
7+
from test.support.script_helper import assert_python_ok
78
import collections.abc
89
from collections import namedtuple, UserDict
910
import copy
@@ -649,15 +650,18 @@ def test_capsule_type(self):
649650
def test_gh131998(self):
650651
# GH-131998: The specialized instruction would get tricked into dereferencing
651652
# a bound "self" that didn't exist if subsequently called unbound.
653+
code = """if True:
654+
import glob
652655
def call(part):
653656
part.pop()
654657
655-
656658
try:
657-
call(["a"])
659+
call(['a'])
658660
call(list)
659661
except:
660662
pass
663+
"""
664+
assert_python_ok("-c", code)
661665

662666

663667
class UnionTests(unittest.TestCase):

0 commit comments

Comments
 (0)
0