Skip to content

Commit bcd6d4d

Browse files
authored
fix tests
1 parent fdc384b commit bcd6d4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_hashlib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ def test_clinic_signature_errors(self):
264264
"is slated for removal in a future version."
265265
)
266266
duplicated_param = re.escape("given by name ('data') and position")
267+
# Depending on whether we call hashlib.__py_new, hashlib.__hash_new,
268+
# or _hashlib.new(), we have different errors as the C implementation
269+
# does not need an additional sentinel.
270+
duplicated_param = f"{conflicting_call}|{duplicated_param}"
267271
for constructor in self.hash_constructors:
268272
with self.subTest(constructor.__name__):
269273
with self.assertRaisesRegex(TypeError, conflicting_call):

0 commit comments

Comments
 (0)