bpo-31787: Skip refleak check when _hashlib is not available (GH-5660)

This commit is contained in:
INADA Naoki 2018-02-13 23:41:19 +09:00 committed by GitHub
parent 2b77a921e6
commit f0bc645dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View 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')