summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/test_utils.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-11-20 17:57:47 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-11-20 17:57:47 (GMT)
commit875e4fbccac563f1ac15fb353879bf57184084fe (patch)
treed81f9765381bc3bf8dde21fcfcf2c18250a4fe0f /Lib/asyncio/test_utils.py
parente342b8e8fe6a3359094688ce63bc0131ed7d416c (diff)
parent0f3c9765d4dd5e0b4df608baf8d93cc0e5c4b227 (diff)
downloadcpython-875e4fbccac563f1ac15fb353879bf57184084fe.zip
cpython-875e4fbccac563f1ac15fb353879bf57184084fe.tar.gz
cpython-875e4fbccac563f1ac15fb353879bf57184084fe.tar.bz2
Merge 3.4
Diffstat (limited to 'Lib/asyncio/test_utils.py')
-rw-r--r--Lib/asyncio/test_utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/asyncio/test_utils.py b/Lib/asyncio/test_utils.py
index e06ac06..8170533 100644
--- a/Lib/asyncio/test_utils.py
+++ b/Lib/asyncio/test_utils.py
@@ -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():