(self)
| 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") |
nothing calls this directly
no test coverage detected