Skip to content

Commit

Permalink
make test_threading more robust for real
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminp committed Aug 19, 2008
1 parent 47bc809 commit fa1e21c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,12 @@ def _run(self, other_ref, yet_another):
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)
Expand Down

0 comments on commit fa1e21c

Please sign in to comment.