MCPcopy Index your code
hub / github.com/python/cpython / test_update_exceptions

Method test_update_exceptions

Lib/test/test_hmac.py:1178–1182  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1176 self.check_update(key, [top, bot])
1177
1178 def test_update_exceptions(self):
1179 h = self.HMAC(b"key")
1180 for msg in ['invalid msg', 123, (), []]:
1181 with self.subTest(msg=msg):
1182 self.assertRaises(TypeError, h.update, msg)
1183
1184
1185@requires_builtin_sha2()

Callers

nothing calls this directly

Calls 3

HMACMethod · 0.95
subTestMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected