File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 4
4
run_with_locale , cpython_only , no_rerun ,
5
5
MISSING_C_DOCSTRINGS ,
6
6
)
7
+ from test .support .script_helper import assert_python_ok
7
8
import collections .abc
8
9
from collections import namedtuple , UserDict
9
10
import copy
@@ -649,15 +650,18 @@ def test_capsule_type(self):
649
650
def test_gh131998 (self ):
650
651
# GH-131998: The specialized instruction would get tricked into dereferencing
651
652
# a bound "self" that didn't exist if subsequently called unbound.
653
+ code = """if True:
654
+ import glob
652
655
def call(part):
653
656
part.pop()
654
657
655
-
656
658
try:
657
- call (["a" ])
659
+ call(['a' ])
658
660
call(list)
659
661
except:
660
662
pass
663
+ """
664
+ assert_python_ok ("-c" , code )
661
665
662
666
663
667
class UnionTests (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments