X Tutup
Skip to content
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 tests
  • Loading branch information
picnixz authored May 27, 2025
commit bcd6d4d3de24540299419ae5d3aca975cf84d1cf
4 changes: 4 additions & 0 deletions Lib/test/test_hashlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ def test_clinic_signature_errors(self):
"is slated for removal in a future version."
)
duplicated_param = re.escape("given by name ('data') and position")
# Depending on whether we call hashlib.__py_new, hashlib.__hash_new,
# or _hashlib.new(), we have different errors as the C implementation
# does not need an additional sentinel.
duplicated_param = f"{conflicting_call}|{duplicated_param}"
for constructor in self.hash_constructors:
with self.subTest(constructor.__name__):
with self.assertRaisesRegex(TypeError, conflicting_call):
Expand Down
Loading
X Tutup