summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_contextlib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-05-29 01:46:48 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-05-29 01:46:48 (GMT)
commit822b87f276d11cbe0d45f91cbeb9e9abdf231c7e (patch)
treea8668c007a993d3b660235543a0690c923a498b4 /Lib/test/test_contextlib.py
parentb4d2d3187419c3674b18b04b0208f456440b5c26 (diff)
downloadcpython-822b87f276d11cbe0d45f91cbeb9e9abdf231c7e.zip
cpython-822b87f276d11cbe0d45f91cbeb9e9abdf231c7e.tar.gz
cpython-822b87f276d11cbe0d45f91cbeb9e9abdf231c7e.tar.bz2
Deprecate contextlib.nested(). The with-statement now provides this functionality directly.
Diffstat (limited to 'Lib/test/test_contextlib.py')
-rw-r--r--Lib/test/test_contextlib.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_contextlib.py b/Lib/test/test_contextlib.py
index 4d029dc..274af3d 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 test_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():
- test_support.run_unittest(__name__)
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore')
+ test_support.run_unittest(__name__)
if __name__ == "__main__":
test_main()