Kaydet (Commit) 603acf99 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Add a comment about unreachable code, and fix a typo

üst 8a172b14
......@@ -176,11 +176,13 @@ class ThreadTests(unittest.TestCase):
except AsyncExc:
pass
else:
# This code is unreachable but it reflects the intent. If we wanted
# to be smarter the above loop wouldn't be infinite.
self.fail("AsyncExc not raised")
try:
self.assertEqual(result, 1) # one thread state modified
except UnboundLocalError:
# The exception was raised to quickly for us to get the result.
# The exception was raised too quickly for us to get the result.
pass
# `worker_started` is set by the thread when it's inside a try/except
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment