diff options
author | Raymond Hettinger <python@rcn.com> | 2009-05-28 22:46:29 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-05-28 22:46:29 (GMT) |
commit | c5b0195ea0f18e8b6243118f74e12b22b6c41518 (patch) | |
tree | 8a3dee8f1c42c7f471693f9f8b8947eb36b4c528 /Lib/test/test_contextlib.py | |
parent | fa3cf21795ec94814b1a2dec3428e5c22d24212f (diff) | |
download | cpython-c5b0195ea0f18e8b6243118f74e12b22b6c41518.zip cpython-c5b0195ea0f18e8b6243118f74e12b22b6c41518.tar.gz cpython-c5b0195ea0f18e8b6243118f74e12b22b6c41518.tar.bz2 |
Suppress deprecation warnings.
Diffstat (limited to 'Lib/test/test_contextlib.py')
-rw-r--r-- | Lib/test/test_contextlib.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_contextlib.py b/Lib/test/test_contextlib.py index c05f37b..f97cd81 100644 --- a/Lib/test/test_contextlib.py +++ b/Lib/test/test_contextlib.py @@ -9,6 +9,7 @@ import unittest import threading from contextlib import * # Tests __all__ from test import support +import warnings class ContextManagerTestCase(unittest.TestCase): @@ -331,7 +332,9 @@ class LockContextTestCase(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() |