diff options
Diffstat (limited to 'Lib/test/test_global.py')
-rw-r--r-- | Lib/test/test_global.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_global.py b/Lib/test/test_global.py index a98e339..37ec672 100644 --- a/Lib/test/test_global.py +++ b/Lib/test/test_global.py @@ -2,7 +2,6 @@ from test.support import run_unittest, check_syntax_error, check_warnings import unittest - import warnings @@ -54,7 +53,9 @@ x = 2 def test_main(): - run_unittest(GlobalTests) + with warnings.catch_warnings(): + warnings.filterwarnings("error", module="<test string>") + run_unittest(GlobalTests) if __name__ == "__main__": test_main() |