Skip to content

Commit

Permalink
test: error message on %d format
Browse files Browse the repository at this point in the history
Co-authored-by: sobolevn <[email protected]>
  • Loading branch information
ApostolFet and sobolevn authored Mar 9, 2025
1 parent 8a2a203 commit f1dfd8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Lib/test/test_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ def check(fmt, vals, result):
check(b'%c', b'a', b'a')

self.assertRaisesRegex(TypeError, '%i format: a real number is required, not complex', operator.mod, '%i', 2j)
self.assertRaisesRegex(TypeError, '%d format: a real number is required, not complex', operator.mod, '%d', 2j)

def test_imod(self):
b = self.type2test(b'hello, %b!')
Expand Down

0 comments on commit f1dfd8a

Please sign in to comment.