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
aae5b9e9
Commit
aae5b9e9
authored
Jul 24, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test in Py2.6
parent
7696a805
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tests/run/test_coroutines_pep492.pyx
tests/run/test_coroutines_pep492.pyx
+3
-2
No files found.
tests/run/test_coroutines_pep492.pyx
View file @
aae5b9e9
...
...
@@ -138,7 +138,7 @@ class AsyncBadSyntaxTest(unittest.TestCase):
'{await a: a for a in b}'
}:
with
self
.
assertRaisesRegex
(
Errors
.
CompileError
,
'await.*in comprehen'
):
exec
(
'async def f():
\
n
\
t
{}'
.
format
(
comp
),
ns
,
ns
)
exec
(
'async def f():
\
n
\
t
{
0
}'
.
format
(
comp
),
ns
,
ns
)
def
test_badsyntax_10
(
self
):
# Tests for issue 24619
...
...
@@ -306,7 +306,8 @@ class AsyncBadSyntaxTest(unittest.TestCase):
"""
]
for
code
in
samples
:
with
self
.
subTest
(
code
=
code
),
self
.
assertRaises
(
Errors
.
CompileError
):
# assertRaises() differs in Py2.6, so use our own assertRaisesRegex() instead
with
self
.
subTest
(
code
=
code
),
self
.
assertRaisesRegex
(
Errors
.
CompileError
,
'.'
):
exec
(
code
,
{},
{})
if
not
hasattr
(
unittest
.
TestCase
,
'subTest'
):
...
...
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