File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 55import pathlib
66import random
77import tokenize
8+ import warnings
89import ast
910from test .support .ast_helper import ASTTestMixin
1011
@@ -839,13 +840,16 @@ def files_to_test(cls):
839840 return items
840841
841842 def test_files (self ):
842- for item in self .files_to_test ():
843- if test .support .verbose :
844- print (f"Testing { item .absolute ()} " )
843+ with warnings .catch_warnings ():
844+ warnings .simplefilter ('ignore' , SyntaxWarning )
845845
846- with self .subTest (filename = item ):
847- source = read_pyfile (item )
848- self .check_ast_roundtrip (source )
846+ for item in self .files_to_test ():
847+ if test .support .verbose :
848+ print (f"Testing { item .absolute ()} " )
849+
850+ with self .subTest (filename = item ):
851+ source = read_pyfile (item )
852+ self .check_ast_roundtrip (source )
849853
850854
851855if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments