File tree 2 files changed +5
-4
lines changed 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Author: Collin Winter
2
2
3
3
import os
4
+ import warnings
4
5
5
6
from test .support import load_package_tests
6
7
7
8
def load_tests (* args ):
8
- return load_package_tests (os .path .dirname (__file__ ), * args )
9
+ with warnings .catch_warnings ():
10
+ warnings .filterwarnings ('ignore' , category = DeprecationWarning , message = 'lib2to3' )
11
+ return load_package_tests (os .path .dirname (__file__ ), * args )
Original file line number Diff line number Diff line change @@ -92,10 +92,8 @@ def test_load_grammar_from_subprocess(self):
92
92
from lib2to3.pgen2 import driver as pgen2_driver
93
93
pgen2_driver.load_grammar(%r, save=True, force=True)
94
94
""" % (grammar_sub_copy ,)
95
- msg = ("lib2to3 package is deprecated and may not be able "
96
- "to parse Python 3.10+" )
97
95
cmd = [sys .executable ,
98
- f '-Wignore:{ msg } :PendingDeprecationWarning ' ,
96
+ '-Wignore:lib2to3:DeprecationWarning ' ,
99
97
'-c' , code ]
100
98
subprocess .check_call ( cmd , env = sub_env )
101
99
self .assertTrue (os .path .exists (pickle_sub_name ))
You can’t perform that action at this time.
0 commit comments