Fix str.rpartition(sep) when sep is not found in str.

Partially from SF patch #1551339, but also taken from head.
This commit is contained in:
Neal Norwitz 2006-09-05 02:21:38 +00:00
parent 8dc71f2161
commit 29a5fdb7ca
6 changed files with 14 additions and 11 deletions

View file

@ -1069,7 +1069,7 @@ class MixinStrUnicodeUserStringTest:
# from raymond's original specification
S = 'http://www.python.org'
self.checkequal(('http', '://', 'www.python.org'), S, 'rpartition', '://')
self.checkequal(('http://www.python.org', '', ''), S, 'rpartition', '?')
self.checkequal(('', '', 'http://www.python.org'), S, 'rpartition', '?')
self.checkequal(('', 'http://', 'www.python.org'), S, 'rpartition', 'http://')
self.checkequal(('http://www.python.', 'org', ''), S, 'rpartition', 'org')