Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
434348c6
Commit
434348c6
authored
Apr 18, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-enable working test in Py2.4
parent
2ed9e546
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
tests/run/unicodemethods.pyx
tests/run/unicodemethods.pyx
+8
-8
No files found.
tests/run/unicodemethods.pyx
View file @
434348c6
...
...
@@ -234,12 +234,12 @@ def startswith(unicode s, sub):
>>> PY_VERSION < (2,5) or text.startswith(('ab', 'ab '))
True
>>>
PY_VERSION < (2,5) or startswith(text, ('ab', 'ab ')) == 'MATCH'
True
>>>
startswith(text, ('ab', 'ab '))
'MATCH'
>>> PY_VERSION < (2,5) or not text.startswith((' ab', 'ab X'))
True
>>>
PY_VERSION < (2,5) or startswith(text, (' ab', 'ab X')) == 'NO MATCH'
True
>>>
startswith(text, (' ab', 'ab X'))
'NO MATCH'
"""
if
s
.
startswith
(
sub
):
return
'MATCH'
...
...
@@ -290,11 +290,11 @@ def endswith(unicode s, sub):
>>> PY_VERSION < (2,5) or text.endswith(('fsdf', 'fsdf '))
True
>>>
PY_VERSION < (2,5) or
endswith(text, ('fsdf', 'fsdf ')) == 'MATCH'
>>> endswith(text, ('fsdf', 'fsdf ')) == 'MATCH'
True
>>> PY_VERSION < (2,5) or not text.endswith(('fsdf', 'fsdf X'))
True
>>>
PY_VERSION < (2,5) or
endswith(text, ('fsdf', 'fsdf X')) == 'NO MATCH'
>>> endswith(text, ('fsdf', 'fsdf X')) == 'NO MATCH'
True
"""
if
s
.
endswith
(
sub
):
...
...
@@ -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)
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
>>> PY_VERSION < (2,5) or not text.endswith(('fsdf ', 'fsdf X'), 10, len(text)-1)
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
"""
if
s
.
endswith
(
sub
,
start
,
end
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment