From: Benjamin Peterson Date: Tue, 19 Aug 2008 01:34:34 +0000 (+0000) Subject: make test more robust X-Git-Tag: v3.0b3~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=039cba1d6852e837967cb6ac0551c3f12e90e622;p=thirdparty%2FPython%2Fcpython.git make test more robust --- diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 6458f7e2d3cc..daff8aeab415 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -324,13 +324,14 @@ class ThreadTests(unittest.TestCase): sys.getrefcount(weak_raising_cyclic_object()))) def test_pep8ified_threading(self): - import threading + import warnings def check(_, w, msg): self.assertEqual(str(w.message), msg) t = threading.Thread() with catch_warning() as w: + warnings.simplefilter("always", DeprecationWarning) msg = "isDaemon() is deprecated in favor of the " \ "Thread.daemon property" check(t.isDaemon(), w, msg)