summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-11-26 08:21:35 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-11-26 08:21:35 (GMT)
commit4f8f9765766a126ebfff3c81655454821f1ad532 (patch)
tree90f6c08e42a551b8bb461d191afddaef5e4f0cf4 /Lib/test/string_tests.py
parentbd93b3ea8fd87742dd56c9c1ff514223892e0d4a (diff)
downloadcpython-4f8f9765766a126ebfff3c81655454821f1ad532.zip
cpython-4f8f9765766a126ebfff3c81655454821f1ad532.tar.gz
cpython-4f8f9765766a126ebfff3c81655454821f1ad532.tar.bz2
Add optional fillchar argument to ljust(), rjust(), and center() string methods.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index af171d0..236c577 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -227,7 +227,7 @@ class CommonTest(unittest.TestCase):
self.checkequal('abc ', 'abc', 'ljust', 6)
self.checkequal('abc', 'abc', 'ljust', 3)
self.checkequal('abc', 'abc', 'ljust', 2)
-
+ self.checkequal('abc*******', 'abc', 'ljust', 10, '*')
self.checkraises(TypeError, 'abc', 'ljust')
def test_rjust(self):
@@ -235,7 +235,7 @@ class CommonTest(unittest.TestCase):
self.checkequal(' abc', 'abc', 'rjust', 6)
self.checkequal('abc', 'abc', 'rjust', 3)
self.checkequal('abc', 'abc', 'rjust', 2)
-
+ self.checkequal('*******abc', 'abc', 'rjust', 10, '*')
self.checkraises(TypeError, 'abc', 'rjust')
def test_center(self):
@@ -243,7 +243,7 @@ class CommonTest(unittest.TestCase):
self.checkequal(' abc ', 'abc', 'center', 6)
self.checkequal('abc', 'abc', 'center', 3)
self.checkequal('abc', 'abc', 'center', 2)
-
+ self.checkequal('***abc****', 'abc', 'center', 10, '*')
self.checkraises(TypeError, 'abc', 'center')
def test_swapcase(self):