summaryrefslogtreecommitdiff
path: root/Lib/test/test_hashlib.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2019-09-25 23:03:30 +0200
committerGitHub <noreply@github.com>2019-09-25 23:03:30 +0200
commitdf69e75edcc08475bc9a57a5a76df8a45bfc3c34 (patch)
tree7011de85654fb7a1f7c21068467f452cf71d600b /Lib/test/test_hashlib.py
parentcc28ed2421bf3953efc0fbde387f28722f3801e2 (diff)
downloadcpython-git-df69e75edcc08475bc9a57a5a76df8a45bfc3c34.tar.gz
bpo-38142: Updated _hashopenssl.c to be PEP 384 compliant (#16071)
* Updated _hashopenssl.c to be PEP 384 compliant * Remove refleak test from test_hashlib. The updated type no longer accepts random arguments to __init__.
Diffstat (limited to 'Lib/test/test_hashlib.py')
-rw-r--r--Lib/test/test_hashlib.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 9204b44bf4..d55de02f91 100644
--- a/Lib/test/test_hashlib.py
+++ b/Lib/test/test_hashlib.py
@@ -167,16 +167,6 @@ class HashLibTestCase(unittest.TestCase):
constructors = self.constructors_to_test.values()
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')
- refs_before = gettotalrefcount()
- for i in range(100):
- sha1_hash.__init__('sha1')
- self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
-
def test_hash_array(self):
a = array.array("b", range(10))
for cons in self.hash_constructors: