Skip to content

Commit

Permalink
fix text_utils_test.py on Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Oct 12, 2023
1 parent 3e58a61 commit 30ce456
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/text_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ def test_uint32ToBytes(self):

with self.assertRaises(struct.error) as ctx:
f(-1)
self.assertEqual(str(ctx.exception), "argument out of range")
if sys.version_info >= (3, 12):
self.assertEqual(
str(ctx.exception),
"'I' format requires 0 <= number <= 4294967295",
)
else:
self.assertEqual(str(ctx.exception), "argument out of range")

def test_uint32FromBytes(self):
f = uint32FromBytes
Expand Down

0 comments on commit 30ce456

Please sign in to comment.