Skip to content

Commit 521f7de

Browse files
committed
test: add test in test_format
1 parent f1dfd8a commit 521f7de

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_format.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ def test_common_format(self):
283283
"%x format: an integer is required, not str")
284284
test_exc_common('%x', 3.14, TypeError,
285285
"%x format: an integer is required, not float")
286+
test_exc_common('%i', '1', TypeError,
287+
"%i format: a real number is required, not str")
288+
test_exc_common('%i', b'1', TypeError,
289+
"%i format: a real number is required, not bytes")
286290

287291
def test_str_format(self):
288292
testformat("%r", "\u0378", "'\\u0378'") # non printable

0 commit comments

Comments
 (0)