]> granicus.if.org Git - python/commitdiff
bpo-31787: Skip refleak check when _hashlib is not available (GH-5660)
authorINADA Naoki <methane@users.noreply.github.com>
Tue, 13 Feb 2018 14:41:19 +0000 (23:41 +0900)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2018 14:41:19 +0000 (23:41 +0900)
Lib/test/test_hashlib.py

index f7df872793c2c5da4355659855453dfe55051a1d..5b0218b08567d84d16aa473d4ed660db9bbf88a6 100644 (file)
@@ -163,6 +163,7 @@ class HashLibTestCase(unittest.TestCase):
         return itertools.chain.from_iterable(constructors)
 
     @support.refcount_test
+    @unittest.skipIf(c_hashlib is None, 'Require _hashlib module')
     def test_refleaks_in_hash___init__(self):
         gettotalrefcount = support.get_attribute(sys, 'gettotalrefcount')
         sha1_hash = c_hashlib.new('sha1')