summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-04-27 22:59:35 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-04-27 22:59:35 (GMT)
commitfd8ea99275cd5fcc3dc97a1d629b873caecd93f4 (patch)
tree482dcd9a9413d0663e1634cbb36f8c609940a2f4
parenteef5c35c14f2193d42a5441ef842ec33b84f3ee6 (diff)
downloadcpython-fd8ea99275cd5fcc3dc97a1d629b873caecd93f4.zip
cpython-fd8ea99275cd5fcc3dc97a1d629b873caecd93f4.tar.gz
cpython-fd8ea99275cd5fcc3dc97a1d629b873caecd93f4.tar.bz2
Issue #7449, part 6: fix test_hashlib for missing threading module
Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
-rw-r--r--Lib/test/test_hashlib.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 8710dd6..ed41672 100644
--- a/Lib/test/test_hashlib.py
+++ b/Lib/test/test_hashlib.py
@@ -299,10 +299,9 @@ class HashLibTestCase(unittest.TestCase):
"e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973eb"+
"de0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b")
+ @unittest.skipUnless(threading, 'Threading required for this test.')
+ @test_support.reap_threads
def test_threaded_hashing(self):
- if not threading:
- raise unittest.SkipTest('No threading module.')
-
# Updating the same hash object from several threads at once
# using data chunk sizes containing the same byte sequences.
#
@@ -337,7 +336,6 @@ class HashLibTestCase(unittest.TestCase):
self.assertEqual(expected_hash, hasher.hexdigest())
-@test_support.reap_threads
def test_main():
test_support.run_unittest(HashLibTestCase)