asyncio: Fix with github

See https://github.com/python/asyncio/pull/295 for details
This commit is contained in:
Yury Selivanov 2015-11-20 12:57:34 -05:00
parent a211a7a0e7
commit 0f3c9765d4
2 changed files with 15 additions and 3 deletions

View file

@ -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():