MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_clinic_signature

Method test_clinic_signature

Lib/test/test_hashlib.py:250–268  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

248
249 @unittest.skipIf(get_fips_mode(), "skip in FIPS mode")
250 def test_clinic_signature(self):
251 for constructor in self.hash_constructors:
252 with self.subTest(constructor.__name__):
253 constructor(b'')
254 constructor(data=b'')
255 constructor(string=b'') # should be deprecated in the future
256
257 digest_name = constructor(b'').name
258 with self.subTest(digest_name):
259 hashlib.new(digest_name, b'')
260 hashlib.new(digest_name, data=b'')
261 hashlib.new(digest_name, string=b'')
262 # Make sure that _hashlib contains the constructor
263 # to test when using a combination of libcrypto and
264 # interned hash implementations.
265 if self._hashlib and digest_name in self._hashlib._constructors:
266 self._hashlib.new(digest_name, b'')
267 self._hashlib.new(digest_name, data=b'')
268 self._hashlib.new(digest_name, string=b'')
269
270 @unittest.expectedFailure # TODO: RUSTPYTHON; duplicate positional/keyword arg error message differs
271 @unittest.skipIf(get_fips_mode(), "skip in FIPS mode")

Callers

nothing calls this directly

Calls 3

subTestMethod · 0.80
constructorFunction · 0.50
newMethod · 0.45

Tested by

no test coverage detected