diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-09-14 14:40:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-14 14:40:56 -0700 |
commit | b9b69003d91c6ea94b890ce24ed25686d30f1428 (patch) | |
tree | 51ff0c32353a7f82e02879bd7b8efd36ffc17ca9 /Lib/test/test_asyncio/test_events.py | |
parent | 167cbde50a88ec2a7d26b2cb9891d5e32bdfbfb5 (diff) | |
download | cpython-b9b69003d91c6ea94b890ce24ed25686d30f1428.tar.gz cpython-b9b69003d91c6ea94b890ce24ed25686d30f1428.zip |
bpo-31234: Add support.join_thread() helper (#3587)
join_thread() joins a thread but raises an AssertionError if the
thread is still alive after timeout seconds.
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 27781a2d91b..33421ce4c37 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -808,7 +808,7 @@ class EventLoopTestsMixin: proto.transport.close() lsock.close() - thread.join(1) + support.join_thread(thread, timeout=1) self.assertFalse(thread.is_alive()) self.assertEqual(proto.state, 'CLOSED') self.assertEqual(proto.nbytes, len(message)) |