Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0f3c9765
Commit
0f3c9765
authored
Nov 20, 2015
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio: Fix with github
See
https://github.com/python/asyncio/pull/295
for details
parent
a211a7a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
Lib/asyncio/test_utils.py
Lib/asyncio/test_utils.py
+11
-0
Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+4
-3
No files found.
Lib/asyncio/test_utils.py
View file @
0f3c9765
...
...
@@ -24,6 +24,7 @@ except ImportError: # pragma: no cover
ssl
=
None
from
.
import
base_events
from
.
import
compat
from
.
import
events
from
.
import
futures
from
.
import
selectors
...
...
@@ -421,6 +422,16 @@ class TestCase(unittest.TestCase):
# in an except block of a generator
self
.
assertEqual
(
sys
.
exc_info
(),
(
None
,
None
,
None
))
if
not
compat
.
PY34
:
# Python 3.3 compatibility
def
subTest
(
self
,
*
args
,
**
kwargs
):
class
EmptyCM
:
def
__enter__
(
self
):
pass
def
__exit__
(
self
,
*
exc
):
pass
return
EmptyCM
()
@
contextlib
.
contextmanager
def
disable_logger
():
...
...
Lib/test/test_asyncio/test_base_events.py
View file @
0f3c9765
...
...
@@ -782,9 +782,10 @@ class BaseEventLoopTests(test_utils.TestCase):
self
.
loop
.
_selector
.
select
.
return_value
=
(
event_sentinel
,)
for
i
in
range
(
1
,
3
):
self
.
loop
.
call_soon
(
self
.
loop
.
stop
)
self
.
loop
.
run_forever
()
self
.
assertEqual
(
callcount
,
1
)
with
self
.
subTest
(
'Loop %d/2'
%
i
):
self
.
loop
.
call_soon
(
self
.
loop
.
stop
)
self
.
loop
.
run_forever
()
self
.
assertEqual
(
callcount
,
1
)
def
test_run_once
(
self
):
# Simple test for test_utils.run_once(). It may seem strange
...
...
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