summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-19 01:34:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-08-19 01:34:34 (GMT)
commit039cba1d6852e837967cb6ac0551c3f12e90e622 (patch)
tree5092d4546decb62176ed91faef6a6af13d828dc6
parent88fde1af31135078d27ea0042c90b633d384d6fa (diff)
downloadcpython-039cba1d6852e837967cb6ac0551c3f12e90e622.zip
cpython-039cba1d6852e837967cb6ac0551c3f12e90e622.tar.gz
cpython-039cba1d6852e837967cb6ac0551c3f12e90e622.tar.bz2
make test more robust
-rw-r--r--Lib/test/test_threading.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 6458f7e..daff8ae 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)