File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1024,13 +1024,12 @@ def test_hmac_digest_digestmod_parameter(self):
10241024 ):
10251025 self .hmac_digest (b'key' , b'msg' , value )
10261026
1027- def test_hmac_new_xof_digestmod (self ):
1027+ @support .subTests ("xof_name" , ("shake_128" , "shake_256" ))
1028+ def test_hmac_new_xof_digestmod (self , xof_name ):
10281029 # gh-145200: XOF digests (SHAKE) are not supported by HMAC.
10291030 # Verify that the error path does not leak the EVP_MAC_CTX.
1030- for xof_name in ('shake_128' , 'shake_256' ):
1031- with self .subTest (digestmod = xof_name ):
1032- with self .assertRaises (_hashlib .UnsupportedDigestmodError ):
1033- self .hmac_new (b'key' , digestmod = xof_name )
1031+ with self .assertRaises (_hashlib .UnsupportedDigestmodError ):
1032+ self .hmac_new (b'key' , digestmod = xof_name )
10341033
10351034
10361035class BuiltinConstructorTestCase (ThroughBuiltinAPIMixin ,
You can’t perform that action at this time.
0 commit comments