Commits

Anonymous committed bc25168

Suppress deprecation warnings.

  • Participants
  • Parent commits 4035383

Comments (0)

Files changed (1)

File Lib/test/test_contextlib.py

 import threading
 from contextlib import *  # Tests __all__
 from test import support
+import warnings
 
 class ContextManagerTestCase(unittest.TestCase):
 
 
 # This is needed to make the test actually run under regrtest.py!
 def test_main():
-    support.run_unittest(__name__)
+    with warnings.catch_warnings():
+        warnings.simplefilter('ignore')
+        support.run_unittest(__name__)
 
 if __name__ == "__main__":
     test_main()