]> 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:33:50 +0000 (07:33 -0800)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2018 15:33:50 +0000 (07:33 -0800)
(cherry picked from commit f0bc645dfede8118c84844bad319cd952c4d1905)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
Lib/test/test_hashlib.py

index 751a713b3e8b64819653c70ec9187676f1e1a572..220b5febc2fea429965b87bcf3a469acb23da028 100644 (file)
@@ -166,6 +166,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')