diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2017-09-14 21:40:56 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-14 21:40:56 (GMT) |
| commit | b9b69003d91c6ea94b890ce24ed25686d30f1428 (patch) | |
| tree | 51ff0c32353a7f82e02879bd7b8efd36ffc17ca9 /Lib/test/test_imaplib.py | |
| parent | 167cbde50a88ec2a7d26b2cb9891d5e32bdfbfb5 (diff) | |
| download | cpython-b9b69003d91c6ea94b890ce24ed25686d30f1428.zip cpython-b9b69003d91c6ea94b890ce24ed25686d30f1428.tar.gz cpython-b9b69003d91c6ea94b890ce24ed25686d30f1428.tar.bz2 | |
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_imaplib.py')
| -rw-r--r-- | Lib/test/test_imaplib.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 132c586..2b62b05 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -220,7 +220,9 @@ class NewIMAPTestsMixin(): # cleanup the server self.server.shutdown() self.server.server_close() - self.thread.join(3.0) + support.join_thread(self.thread, 3.0) + # Explicitly clear the attribute to prevent dangling thread + self.thread = None def test_EOF_without_complete_welcome_message(self): # http://bugs.python.org/issue5949 |
