File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,16 @@ def test_load_grammar_from_subprocess(self):
84
84
# different hash randomization seed.
85
85
sub_env = dict (os .environ )
86
86
sub_env ['PYTHONHASHSEED' ] = 'random'
87
- subprocess .check_call (
88
- [sys .executable , '-c' , """
87
+ code = """
89
88
from lib2to3.pgen2 import driver as pgen2_driver
90
89
pgen2_driver.load_grammar(%r, save=True, force=True)
91
- """ % (grammar_sub_copy ,)],
92
- env = sub_env )
90
+ """ % (grammar_sub_copy ,)
91
+ msg = ("lib2to3 package is deprecated and may not be able "
92
+ "to parse Python 3.10+" )
93
+ cmd = [sys .executable ,
94
+ f'-Wignore:{ msg } :PendingDeprecationWarning' ,
95
+ '-c' , code ]
96
+ subprocess .check_call ( cmd , env = sub_env )
93
97
self .assertTrue (os .path .exists (pickle_sub_name ))
94
98
95
99
with open (pickle_name , 'rb' ) as pickle_f_1 , \
You can’t perform that action at this time.
0 commit comments