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):
8484 # different hash randomization seed.
8585 sub_env = dict (os .environ )
8686 sub_env ['PYTHONHASHSEED' ] = 'random'
87- subprocess .check_call (
88- [sys .executable , '-c' , """
87+ code = """
8988from lib2to3.pgen2 import driver as pgen2_driver
9089pgen2_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 )
9397 self .assertTrue (os .path .exists (pickle_sub_name ))
9498
9599 with open (pickle_name , 'rb' ) as pickle_f_1 , \
You can’t perform that action at this time.
0 commit comments