10000 gh-127740: Add some more tests for earlier PR #127756 by srinivasreddy · Pull Request #127818 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-127740: Add some more tests for earlier PR #127756 #127818

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 3 commits into from
Dec 12, 2024
Merged
Changes from all commits
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
CAFE
Diff view
4 changes: 4 additions & 0 deletions Lib/test/test_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,10 @@ def test_fromhex(self):
with self.assertRaises(ValueError) as cm:
self.type2test.fromhex(value)
self.assertIn("fromhex() arg must contain an even number of hexadecimal digits", str(cm.exception))
for value, position in (("a ", 1), (" aa a ", 5), (" aa a a ", 5)):
with self.assertRaises(ValueError) as cm:
self.type2test.fromhex(value)
self.assertIn(f"non-hexadecimal number found in fromhex() arg at position {position}", str(cm.exception))

for data, pos in (
# invalid first hexadecimal character
Expand Down
Loading
0