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
0fb7c071
Commit
0fb7c071
authored
Jul 29, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unittest fixes and work-arounds for older Python versions
parent
631e8b33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
tests/run/test_asyncgen.py
tests/run/test_asyncgen.py
+11
-1
No files found.
tests/run/test_asyncgen.py
View file @
0fb7c071
...
@@ -224,7 +224,7 @@ class AsyncGenTest(unittest.TestCase):
...
@@ -224,7 +224,7 @@ class AsyncGenTest(unittest.TestCase):
if
sys
.
version_info
<
(
3
,
3
):
if
sys
.
version_info
<
(
3
,
3
):
@
contextlib
.
contextmanager
@
contextlib
.
contextmanager
def
assertRaisesRegex
(
self
,
exc_type
,
regex
):
def
assertRaisesRegex
(
self
,
exc_type
,
regex
=
None
):
# the error messages usually don't match, so we just ignore them
# the error messages usually don't match, so we just ignore them
try
:
try
:
yield
yield
...
@@ -233,6 +233,16 @@ class AsyncGenTest(unittest.TestCase):
...
@@ -233,6 +233,16 @@ class AsyncGenTest(unittest.TestCase):
else
:
else
:
self
.
assertTrue
(
False
)
self
.
assertTrue
(
False
)
if
sys
.
version_info
<
(
2
,
7
):
def
assertIn
(
self
,
x
,
container
):
self
.
assertTrue
(
x
in
container
)
def
assertIs
(
self
,
x
,
y
):
self
.
assertTrue
(
x
is
y
)
assertRaises
=
assertRaisesRegex
def
compare_generators
(
self
,
sync_gen
,
async_gen
):
def
compare_generators
(
self
,
sync_gen
,
async_gen
):
def
sync_iterate
(
g
):
def
sync_iterate
(
g
):
res
=
[]
res
=
[]
...
...
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