benjamin.peterson
2008-08-19 01:34:34 UTC
Author: benjamin.peterson
Date: Tue Aug 19 03:34:34 2008
New Revision: 65848
Log:
make test more robust
Modified:
python/branches/py3k/Lib/test/test_threading.py
Modified: python/branches/py3k/Lib/test/test_threading.py
==============================================================================
--- python/branches/py3k/Lib/test/test_threading.py (original)
+++ python/branches/py3k/Lib/test/test_threading.py Tue Aug 19 03:34:34 2008
@@ -324,13 +324,14 @@
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)
Date: Tue Aug 19 03:34:34 2008
New Revision: 65848
Log:
make test more robust
Modified:
python/branches/py3k/Lib/test/test_threading.py
Modified: python/branches/py3k/Lib/test/test_threading.py
==============================================================================
--- python/branches/py3k/Lib/test/test_threading.py (original)
+++ python/branches/py3k/Lib/test/test_threading.py Tue Aug 19 03:34:34 2008
@@ -324,13 +324,14 @@
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)