Skip to content

Commit 9bd80b7

Browse files
committed
Test: integration test for zfill
1 parent db65820 commit 9bd80b7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

integration_tests/test_str_attributes.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,17 @@ def expandtabs():
497497
assert s.expandtabs(0) == "testtest"
498498
assert s.expandtabs(-5) == "testtest"
499499

500+
def zfill():
501+
s1: str = "Teststr"
502+
s2: str = "+12T8tr"
503+
s3: str = "-!@)21"
504+
assert s1.zfill(4) == "Teststr"
505+
assert s1.zfill(-3) == "Teststr"
506+
assert s1.zfill(10) == "000Teststr"
507+
508+
assert s2.zfill(9) == "+0012T8tr"
509+
assert s3.zfill(11) == "-00000!@)21"
510+
500511
def check():
501512
capitalize()
502513
lower()
@@ -519,6 +530,7 @@ def check():
519530
is_numeric()
520531
center()
521532
expandtabs()
533+
zfill()
522534

523535

524536
check()

0 commit comments

Comments
 (0)