Commit 434348c6 authored by Stefan Behnel's avatar Stefan Behnel

re-enable working test in Py2.4

parent 2ed9e546
...@@ -234,12 +234,12 @@ def startswith(unicode s, sub): ...@@ -234,12 +234,12 @@ def startswith(unicode s, sub):
>>> PY_VERSION < (2,5) or text.startswith(('ab', 'ab ')) >>> PY_VERSION < (2,5) or text.startswith(('ab', 'ab '))
True True
>>> PY_VERSION < (2,5) or startswith(text, ('ab', 'ab ')) == 'MATCH' >>> startswith(text, ('ab', 'ab '))
True 'MATCH'
>>> PY_VERSION < (2,5) or not text.startswith((' ab', 'ab X')) >>> PY_VERSION < (2,5) or not text.startswith((' ab', 'ab X'))
True True
>>> PY_VERSION < (2,5) or startswith(text, (' ab', 'ab X')) == 'NO MATCH' >>> startswith(text, (' ab', 'ab X'))
True 'NO MATCH'
""" """
if s.startswith(sub): if s.startswith(sub):
return 'MATCH' return 'MATCH'
...@@ -290,11 +290,11 @@ def endswith(unicode s, sub): ...@@ -290,11 +290,11 @@ def endswith(unicode s, sub):
>>> PY_VERSION < (2,5) or text.endswith(('fsdf', 'fsdf ')) >>> PY_VERSION < (2,5) or text.endswith(('fsdf', 'fsdf '))
True True
>>> PY_VERSION < (2,5) or endswith(text, ('fsdf', 'fsdf ')) == 'MATCH' >>> endswith(text, ('fsdf', 'fsdf ')) == 'MATCH'
True True
>>> PY_VERSION < (2,5) or not text.endswith(('fsdf', 'fsdf X')) >>> PY_VERSION < (2,5) or not text.endswith(('fsdf', 'fsdf X'))
True True
>>> PY_VERSION < (2,5) or endswith(text, ('fsdf', 'fsdf X')) == 'NO MATCH' >>> endswith(text, ('fsdf', 'fsdf X')) == 'NO MATCH'
True True
""" """
if s.endswith(sub): if s.endswith(sub):
...@@ -321,11 +321,11 @@ def endswith_start_end(unicode s, sub, start, end): ...@@ -321,11 +321,11 @@ def endswith_start_end(unicode s, sub, start, end):
>>> PY_VERSION < (2,5) or text.endswith(('fsd', 'fsdf'), 10, len(text)-1) >>> PY_VERSION < (2,5) or text.endswith(('fsd', 'fsdf'), 10, len(text)-1)
True True
>>> PY_VERSION < (2,5) or endswith_start_end(text, ('fsd', 'fsdf'), 10, len(text)-1) == 'MATCH' >>> endswith_start_end(text, ('fsd', 'fsdf'), 10, len(text)-1) == 'MATCH'
True True
>>> PY_VERSION < (2,5) or not text.endswith(('fsdf ', 'fsdf X'), 10, len(text)-1) >>> PY_VERSION < (2,5) or not text.endswith(('fsdf ', 'fsdf X'), 10, len(text)-1)
True True
>>> PY_VERSION < (2,5) or endswith_start_end(text, ('fsdf ', 'fsdf X'), 10, len(text)-1) == 'NO MATCH' >>> endswith_start_end(text, ('fsdf ', 'fsdf X'), 10, len(text)-1) == 'NO MATCH'
True True
""" """
if s.endswith(sub, start, end): if s.endswith(sub, start, end):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment