[Python-checkins] r72997 - python/branches/py3k/Lib/test/test_contextlib.py
raymond.hettinger
python-checkins at python.org
Fri May 29 00:46:29 CEST 2009
Author: raymond.hettinger
Date: Fri May 29 00:46:29 2009
New Revision: 72997
Log:
Suppress deprecation warnings.
Modified:
python/branches/py3k/Lib/test/test_contextlib.py
Modified: python/branches/py3k/Lib/test/test_contextlib.py
==============================================================================
--- python/branches/py3k/Lib/test/test_contextlib.py (original)
+++ python/branches/py3k/Lib/test/test_contextlib.py Fri May 29 00:46:29 2009
@@ -9,6 +9,7 @@
import threading
from contextlib import * # Tests __all__
from test import support
+import warnings
class ContextManagerTestCase(unittest.TestCase):
@@ -331,7 +332,9 @@
# 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()
More information about the Python-checkins
mailing list