gh-130149: refactor tests for HMAC (#130150) · python/cpython@8f11af4 · GitHub
Skip to content

Commit 8f11af4

Browse files
authored
gh-130149: refactor tests for HMAC (#130150)
Since we plan to introduce a built-in implementation for HMAC based on HACL*, it becomes important for the HMAC tests to be flexible enough to avoid code duplication. In addition to the new layout based on mixin classes, we extend test coverage by also testing the `__repr__` of HMAC objects and the HMAC one-shot functions. We also fix the import to `_sha256` which, since gh-101924, resulted in some tests being skipped as the module is no more available (its content was moved to the `_sha2` module).
1 parent a105f99 commit 8f11af4

2 files changed

Lines changed: 818 additions & 417 deletions

File tree

Lib/test/support/hashlib_helper.py

Lines changed: 5 additions & 1 deletion

0 commit comments

Comments
 (0)