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
Gwenaël Samain
cython
Commits
7210462c
Commit
7210462c
authored
Dec 24, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix fstring tests in Py2.6.
parent
3279482a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/run/fstring.pyx
tests/run/fstring.pyx
+4
-4
No files found.
tests/run/fstring.pyx
View file @
7210462c
...
...
@@ -167,7 +167,7 @@ def format_c_number_range_width(int n):
"""
>>> for i in range(-1000, 1001):
... formatted = format_c_number_range_width(i)
... expected = '{
:04d}'.format(
i)
... expected = '{
n:04d}'.format(n=
i)
... assert formatted == expected, "%r != %r" % (formatted, expected)
"""
return
f'
{
n
:
04
}
'
...
...
@@ -177,7 +177,7 @@ def format_c_number_range_width0(int n):
"""
>>> for i in range(-100, 101):
... formatted = format_c_number_range_width0(i)
... expected = '{
:00d}'.format(
i)
... expected = '{
n:00d}'.format(n=
i)
... assert formatted == expected, "%r != %r" % (formatted, expected)
"""
return
f'
{
n
:
00
}
'
...
...
@@ -187,7 +187,7 @@ def format_c_number_range_width1(int n):
"""
>>> for i in range(-100, 101):
... formatted = format_c_number_range_width1(i)
... expected = '{
:01d}'.format(
i)
... expected = '{
n:01d}'.format(n=
i)
... assert formatted == expected, "%r != %r" % (formatted, expected)
"""
return
f'
{
n
:
01
}
'
...
...
@@ -197,7 +197,7 @@ def format_c_number_range_width_m4(int n):
"""
>>> for i in range(-100, 101):
... formatted = format_c_number_range_width_m4(i)
... expected = '{
:-4d}'.format(
i)
... expected = '{
n:-4d}'.format(n=
i)
... assert formatted == expected, "%r != %r" % (formatted, expected)
"""
return
f'
{
n
:
-
4
}
'
...
...
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