diff options
author | Andrew Dalke <dalke@dalkescientific.com> | 2006-05-26 16:22:52 (GMT) |
---|---|---|
committer | Andrew Dalke <dalke@dalkescientific.com> | 2006-05-26 16:22:52 (GMT) |
commit | 725fe4089d74f208bb820b967fd54cd982d1a26b (patch) | |
tree | 70370837c5d4e01965dbbcdeb85b33efd4c3034f /Lib | |
parent | 02758d66cef8be4cdbe262a8f27837ba85e40cce (diff) | |
download | cpython-725fe4089d74f208bb820b967fd54cd982d1a26b.zip cpython-725fe4089d74f208bb820b967fd54cd982d1a26b.tar.gz cpython-725fe4089d74f208bb820b967fd54cd982d1a26b.tar.bz2 |
Test for more edge strip cases; leading and trailing separator gets removed
even with strip(..., 0)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/string_tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 2469830..e242170 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -246,6 +246,7 @@ class CommonTest(unittest.TestCase): self.checkequal(['a', 'b', 'c', 'd'], 'a b c d', 'split', None, sys.maxint-1) self.checkequal(['a b c d'], 'a b c d', 'split', None, 0) + self.checkequal(['a b c d'], ' a b c d', 'split', None, 0) self.checkequal(['a', 'b', 'c d'], 'a b c d', 'split', None, 2) self.checkequal([], ' ', 'split') @@ -332,6 +333,7 @@ class CommonTest(unittest.TestCase): self.checkequal(['a', 'b', 'c', 'd'], 'a b c d', 'rsplit', None, sys.maxint-20) self.checkequal(['a b c d'], 'a b c d', 'rsplit', None, 0) + self.checkequal(['a b c d'], 'a b c d ', 'rsplit', None, 0) self.checkequal(['a b', 'c', 'd'], 'a b c d', 'rsplit', None, 2) self.checkequal([], ' ', 'rsplit') |