]> granicus.if.org Git - python/commitdiff
make test_threading more robust for real
authorBenjamin Peterson <benjamin@python.org>
Tue, 19 Aug 2008 14:12:01 +0000 (14:12 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 19 Aug 2008 14:12:01 +0000 (14:12 +0000)
Lib/test/test_threading.py

index daff8aeab4156bac6f99742cac9a085d031604e6..d0316073cb55bbfaadddeed85ed94699c4b6e3d5 100644 (file)
@@ -324,14 +324,12 @@ class ThreadTests(unittest.TestCase):
                                sys.getrefcount(weak_raising_cyclic_object())))
 
     def test_pep8ified_threading(self):
-        import warnings
-
         def check(_, w, msg):
             self.assertEqual(str(w.message), msg)
 
         t = threading.Thread()
         with catch_warning() as w:
-            warnings.simplefilter("always", DeprecationWarning)
+            del threading.__warningregistry__
             msg = "isDaemon() is deprecated in favor of the " \
                   "Thread.daemon property"
             check(t.isDaemon(), w, msg)