MCPcopy Create free account
hub / github.com/python/cpython / assert_hmac_extra_cases

Method assert_hmac_extra_cases

Lib/test/test_hmac.py:816–823  ·  view source on GitHub ↗
(
        self, key, msg, hexdigest, digestmod, hashname, digest_size, block_size
    )

Source from the content-addressed store, hash-verified

814 """
815
816 def assert_hmac_extra_cases(
817 self, key, msg, hexdigest, digestmod, hashname, digest_size, block_size
818 ):
819 # assert one-shot HMAC at the same time
820 with self.subTest(key=key, msg=msg, hashname=hashname):
821 func = getattr(self.hmac, f'compute_{hashname}')
822 self.assertTrue(callable(func))
823 self.check_hmac_hexdigest(key, msg, hexdigest, digest_size, func)
824
825
826class DigestModTestCaseMixin(CreatorMixin, DigestMixin):

Callers

nothing calls this directly

Calls 3

assertTrueMethod · 0.80
check_hmac_hexdigestMethod · 0.80
subTestMethod · 0.45

Tested by

no test coverage detected