diff options
author | grzgrzgrz3 <grzgrzgrz3@gmail.com> | 2017-05-15 19:01:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-05-15 19:01:07 (GMT) |
commit | 6924ed55c9807d69757e03bbe1caeec1104efacb (patch) | |
tree | 43f0fa4c58ae42adabdbf1a9df8983148808d95a /Lib/test/test_thread.py | |
parent | 9d1983be503012e750f49d31b569f3fe4554c628 (diff) | |
download | cpython-6924ed55c9807d69757e03bbe1caeec1104efacb.zip cpython-6924ed55c9807d69757e03bbe1caeec1104efacb.tar.gz cpython-6924ed55c9807d69757e03bbe1caeec1104efacb.tar.bz2 |
bpo-30357 each test in test_thread waits until all spawned threads finish (#1583)
* bpo-30357 each test in test_thread waits until all spawn threads finish
* bpo-30357 each test in test_thread waits until all spawn threads finish
* bpo-30357: test_thread now uses threading_cleanup() (#1592)
test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.
Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
* bpo-30357: test_thread now uses threading_cleanup() (#1592)
test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.
Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
Diffstat (limited to 'Lib/test/test_thread.py')
-rw-r--r-- | Lib/test/test_thread.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py index b466138..2f9abe0 100644 --- a/Lib/test/test_thread.py +++ b/Lib/test/test_thread.py @@ -22,6 +22,7 @@ def verbose_print(arg): print arg + class BasicThreadTest(unittest.TestCase): def setUp(self): @@ -33,6 +34,9 @@ class BasicThreadTest(unittest.TestCase): self.running = 0 self.next_ident = 0 + key = test_support.threading_setup() + self.addCleanup(test_support.threading_cleanup, *key) + class ThreadRunningTests(BasicThreadTest): |