summaryrefslogtreecommitdiff
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-09-15 16:55:47 -0700
committerGitHub <noreply@github.com>2017-09-15 16:55:47 -0700
commit2c1c2ca2548f943d6323859f17612aa5a4a19165 (patch)
tree15e94e4908de2b034fa12edd1d0eb26ccfeee0e2 /Lib/test/test_decimal.py
parent4d72945a28bc9e535a74b42eb0b40702c2f69e16 (diff)
downloadcpython-git-2c1c2ca2548f943d6323859f17612aa5a4a19165.tar.gz
[3.6] bpo-31234: Join threads in tests (#3589)
* bpo-31234: Join threads in tests (#3572) Call thread.join() on threads to prevent the "dangling threads" warning. (cherry picked from commit 18e95b4176256f100429a806d0455406df98f984) * bpo-31234: Join threads in test_hashlib (#3573) * bpo-31234: Join threads in test_hashlib Use thread.join() to wait until the parallel hash tasks complete rather than using events. Calling thread.join() prevent "dangling thread" warnings. * test_hashlib: minor PEP 8 coding style fixes (cherry picked from commit 8dcf22f442320e4c1a5408e67b4c9002ad105f17) * bpo-31234: Join threads in test_threading (#3579) Call thread.join() to prevent the "dangling thread" warning. (cherry picked from commit b8c7be2c523b012e57915182543d06657161057f) * bpo-31234: Join threads in test_queue (#3586) Call thread.join() to prevent the "dangling thread" warning. (cherry picked from commit 167cbde50a88ec2a7d26b2cb9891d5e32bdfbfb5) * bpo-31234: Join timers in test_threading (#3598) Call the .join() method of threading.Timer timers to prevent the "threading_cleanup() failed to cleanup 1 threads" warning. (cherry picked from commit da3e5cf961f9bcc4bb376386cfe7a2865325086c)
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 617a37eec8..57094ad669 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -1614,6 +1614,9 @@ class ThreadingTest(unittest.TestCase):
for sig in Signals[self.decimal]:
self.assertFalse(DefaultContext.flags[sig])
+ th1.join()
+ th2.join()
+
DefaultContext.prec = save_prec
DefaultContext.Emax = save_emax
DefaultContext.Emin = save_emin