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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
bb002275
Commit
bb002275
authored
Mar 30, 2021
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some safety fixes and clean up Py2 test-helper in test_fstring.pyx.
parent
f29ef5b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/run/test_fstring.pyx
tests/run/test_fstring.pyx
+2
-2
No files found.
tests/run/test_fstring.pyx
View file @
bb002275
...
@@ -55,10 +55,10 @@ class TestCase(CythonTest):
...
@@ -55,10 +55,10 @@ class TestCase(CythonTest):
def
assertEqual
(
self
,
first
,
second
,
msg
=
None
):
def
assertEqual
(
self
,
first
,
second
,
msg
=
None
):
# strip u'' string prefixes in Py2
# strip u'' string prefixes in Py2
if
first
!=
second
and
isinstance
(
first
,
unicode
):
if
first
!=
second
and
isinstance
(
first
,
unicode
):
stripped_first
=
first
.
replace
(
"u'"
,
"'"
).
replace
(
'u"'
,
'"'
)
stripped_first
=
first
.
replace
(
u"u'"
,
u"'"
).
replace
(
u'u"'
,
u
'"'
)
if
stripped_first
==
second
:
if
stripped_first
==
second
:
first
=
stripped_first
first
=
stripped_first
elif
stripped_first
.
decode
(
'unicode_escape'
)
==
second
:
elif
u'
\
\
'
in
stripped_first
and
stripped_first
.
decode
(
'unicode_escape'
)
==
second
:
first
=
stripped_first
.
decode
(
'unicode_escape'
)
first
=
stripped_first
.
decode
(
'unicode_escape'
)
super
(
TestCase
,
self
).
assertEqual
(
first
,
second
,
msg
)
super
(
TestCase
,
self
).
assertEqual
(
first
,
second
,
msg
)
...
...
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