]> granicus.if.org Git - python/commitdiff
bpo-31787: Skip refleak check when _hashlib is not available (GH-5660)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 13 Feb 2018 15:07:34 +0000 (07:07 -0800)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2018 15:07:34 +0000 (07:07 -0800)
(cherry picked from commit f0bc645dfede8118c84844bad319cd952c4d1905)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
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')