(self)
| 230 | if _algo.islower())) |
| 231 | |
| 232 | def test_algorithms_available(self): |
| 233 | self.assertTrue(set(hashlib.algorithms_guaranteed). |
| 234 | issubset(hashlib.algorithms_available)) |
| 235 | # all available algorithms must be loadable, bpo-47101 |
| 236 | self.assertNotIn("undefined", hashlib.algorithms_available) |
| 237 | for name in hashlib.algorithms_available: |
| 238 | with self.subTest(name): |
| 239 | try: |
| 240 | _ = hashlib.new(name, usedforsecurity=False) |
| 241 | except ValueError as exc: |
| 242 | self.skip_if_blake2_not_builtin(name, exc) |
| 243 | raise |
| 244 | |
| 245 | def test_usedforsecurity_true(self): |
| 246 | hashlib.new("sha256", usedforsecurity=True) |
nothing calls this directly
no test coverage detected