We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db65820 commit 9bd80b7Copy full SHA for 9bd80b7
integration_tests/test_str_attributes.py
@@ -497,6 +497,17 @@ def expandtabs():
497
assert s.expandtabs(0) == "testtest"
498
assert s.expandtabs(-5) == "testtest"
499
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
511
def check():
512
capitalize()
513
lower()
@@ -519,6 +530,7 @@ def check():
519
530
is_numeric()
520
531
center()
521
532
expandtabs()
533
+ zfill()
522
534
523
535
524
536
check()
0 commit comments