8000 bpo-43988: Use check disallow instantiation helper by erlend-aasland · Pull Request #26392 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43988: Use check disallow instantiation helper #26392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 27, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix hmac test
  • Loading branch information
Erlend E. Aasland committed May 26, 2021
commit 387f04ca90e7c0d01f0d0c7d78629fbc9204b8a5
4 changes: 2 additions & 2 deletions Lib/test/test_hmac.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest.mock
import warnings

from test.support import hashlib_helper
from test.support import hashlib_helper, check_disallow_instantiation

from _operator import _compare_digest as operator_compare_digest

Expand Down Expand Up @@ -439,7 +439,7 @@ def test_withmodule(self):
@unittest.skipUnless(C_HMAC is not None, 'need _hashlib')
def test_internal_types(self):
# internal types like _hashlib.C_HMAC are not constructable
support.check_disallow_instantiation(self, C_HMAC)
check_disallow_instantiation(self, C_HMAC)
with self.assertRaisesRegex(TypeError, "immutable type"):
C_HMAC.value = None

Expand Down
0