We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1914aca commit 5101034Copy full SHA for 5101034
1 file changed
Lib/test/test_types.py
@@ -4,6 +4,7 @@
4
run_with_locale, cpython_only, no_rerun,
5
MISSING_C_DOCSTRINGS,
6
)
7
+from test.support.script_helper import assert_python_ok
8
import collections.abc
9
from collections import namedtuple, UserDict
10
import copy
@@ -649,15 +650,18 @@ def test_capsule_type(self):
649
650
def test_gh131998(self):
651
# GH-131998: The specialized instruction would get tricked into dereferencing
652
# a bound "self" that didn't exist if subsequently called unbound.
653
+ code = """if True:
654
+ import glob
655
def call(part):
656
part.pop()
657
-
658
try:
- call(["a"])
659
+ call(['a'])
660
call(list)
661
except:
662
pass
663
+ """
664
+ assert_python_ok("-c", code)
665
666
667
class UnionTests(unittest.TestCase):
0 commit comments