Skip to content

Commit 9ccc9d7

Browse files
author
j30ng
committed
Add Testcase
1 parent 3768233 commit 9ccc9d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/snippets/builtin_format.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ class BadFormat:
1212
def __format__(self, spec):
1313
return 42
1414
assert_raises(TypeError, format, BadFormat())
15+
16+
def test_zero_padding():
17+
i = 1
18+
assert f'{i:04d}' == '0001'
19+
20+
test_zero_padding()

0 commit comments

Comments
 (0)