File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Author: Collin Winter
22
33import os
4+ import warnings
45
56from test .support import load_package_tests
67
78def 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):
9292from lib2to3.pgen2 import driver as pgen2_driver
9393pgen2_driver.load_grammar(%r, save=True, force=True)
9494 """ % (grammar_sub_copy ,)
95- msg = ("lib2to3 package is deprecated and may not be able "
96- "to parse Python 3.10+" )
9795 cmd = [sys .executable ,
98- f '-Wignore:{ msg } :PendingDeprecationWarning ' ,
96+ '-Wignore:lib2to3:DeprecationWarning ' ,
9997 '-c' , code ]
10098 subprocess .check_call ( cmd , env = sub_env )
10199 self .assertTrue (os .path .exists (pickle_sub_name ))
You can’t perform that action at this time.
0 commit comments