Commit f212c3e4 authored by Stefan Behnel's avatar Stefan Behnel

Remove dead Py2.5 code from test.

parent 2604107e
...@@ -4,8 +4,6 @@ cimport cython ...@@ -4,8 +4,6 @@ cimport cython
import sys import sys
PY_VERSION = sys.version_info
text = u'ab jd sdflk as sa sadas asdas fsdf ' text = u'ab jd sdflk as sa sadas asdas fsdf '
sep = u' ' sep = u' '
format1 = u'abc%sdef' format1 = u'abc%sdef'
...@@ -305,11 +303,11 @@ def startswith(unicode s, sub): ...@@ -305,11 +303,11 @@ def startswith(unicode s, sub):
>>> startswith(text, 'ab X') >>> startswith(text, 'ab X')
'NO MATCH' 'NO MATCH'
>>> PY_VERSION < (2,5) or text.startswith(('ab', 'ab ')) >>> text.startswith(('ab', 'ab '))
True True
>>> startswith(text, ('ab', 'ab ')) >>> startswith(text, ('ab', 'ab '))
'MATCH' 'MATCH'
>>> PY_VERSION < (2,5) or not text.startswith((' ab', 'ab X')) >>> not text.startswith((' ab', 'ab X'))
True True
>>> startswith(text, (' ab', 'ab X')) >>> startswith(text, (' ab', 'ab X'))
'NO MATCH' 'NO MATCH'
...@@ -365,11 +363,11 @@ def endswith(unicode s, sub): ...@@ -365,11 +363,11 @@ def endswith(unicode s, sub):
>>> endswith(text, 'fsdf X') >>> endswith(text, 'fsdf X')
'NO MATCH' 'NO MATCH'
>>> PY_VERSION < (2,5) or text.endswith(('fsdf', 'fsdf ')) >>> text.endswith(('fsdf', 'fsdf '))
True True
>>> endswith(text, ('fsdf', 'fsdf ')) >>> endswith(text, ('fsdf', 'fsdf '))
'MATCH' 'MATCH'
>>> PY_VERSION < (2,5) or not text.endswith(('fsdf', 'fsdf X')) >>> not text.endswith(('fsdf', 'fsdf X'))
True True
>>> endswith(text, ('fsdf', 'fsdf X')) >>> endswith(text, ('fsdf', 'fsdf X'))
'NO MATCH' 'NO MATCH'
...@@ -401,11 +399,11 @@ def endswith_start_end(unicode s, sub, start, end): ...@@ -401,11 +399,11 @@ def endswith_start_end(unicode s, sub, start, end):
>>> endswith_start_end(text, 'fsdf ', -1000, 5000) >>> endswith_start_end(text, 'fsdf ', -1000, 5000)
'MATCH' 'MATCH'
>>> PY_VERSION < (2,5) or text.endswith(('fsd', 'fsdf'), 10, len(text)-1) >>> text.endswith(('fsd', 'fsdf'), 10, len(text)-1)
True True
>>> endswith_start_end(text, ('fsd', 'fsdf'), 10, len(text)-1) >>> endswith_start_end(text, ('fsd', 'fsdf'), 10, len(text)-1)
'MATCH' 'MATCH'
>>> PY_VERSION < (2,5) or not text.endswith(('fsdf ', 'fsdf X'), 10, len(text)-1) >>> not text.endswith(('fsdf ', 'fsdf X'), 10, len(text)-1)
True True
>>> endswith_start_end(text, ('fsdf ', 'fsdf X'), 10, len(text)-1) >>> endswith_start_end(text, ('fsdf ', 'fsdf X'), 10, len(text)-1)
'NO MATCH' 'NO MATCH'
......
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