summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-06-17 23:36:32 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-06-17 23:36:32 (GMT)
commitc73701de7292b7de0fee5b7f82a610d7515c18a4 (patch)
tree18db9589cbd8880f4b1ac411bf675de788740e34 /Lib/test/test_asyncio/test_events.py
parentd6f02fc649d2e248f2e7b418771371db2b6637a2 (diff)
downloadcpython-c73701de7292b7de0fee5b7f82a610d7515c18a4.zip
cpython-c73701de7292b7de0fee5b7f82a610d7515c18a4.tar.gz
cpython-c73701de7292b7de0fee5b7f82a610d7515c18a4.tar.bz2
asyncio: Refactor tests: add a base TestCase class
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r--Lib/test/test_asyncio/test_events.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 2262a75..37e45e1 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -224,7 +224,7 @@ class EventLoopTestsMixin:
def setUp(self):
super().setUp()
self.loop = self.create_event_loop()
- asyncio.set_event_loop(None)
+ self.set_event_loop(self.loop)
def tearDown(self):
# just in case if we have transport close callbacks
@@ -1629,14 +1629,14 @@ class SubprocessTestsMixin:
if sys.platform == 'win32':
- class SelectEventLoopTests(EventLoopTestsMixin, unittest.TestCase):
+ class SelectEventLoopTests(EventLoopTestsMixin, test_utils.TestCase):
def create_event_loop(self):
return asyncio.SelectorEventLoop()
class ProactorEventLoopTests(EventLoopTestsMixin,
SubprocessTestsMixin,
- unittest.TestCase):
+ test_utils.TestCase):
def create_event_loop(self):
return asyncio.ProactorEventLoop()
@@ -1691,7 +1691,7 @@ else:
if hasattr(selectors, 'KqueueSelector'):
class KqueueEventLoopTests(UnixEventLoopTestsMixin,
SubprocessTestsMixin,
- unittest.TestCase):
+ test_utils.TestCase):
def create_event_loop(self):
return asyncio.SelectorEventLoop(
@@ -1716,7 +1716,7 @@ else:
if hasattr(selectors, 'EpollSelector'):
class EPollEventLoopTests(UnixEventLoopTestsMixin,
SubprocessTestsMixin,
- unittest.TestCase):
+ test_utils.TestCase):
def create_event_loop(self):
return asyncio.SelectorEventLoop(selectors.EpollSelector())
@@ -1724,7 +1724,7 @@ else:
if hasattr(selectors, 'PollSelector'):
class PollEventLoopTests(UnixEventLoopTestsMixin,
SubprocessTestsMixin,
- unittest.TestCase):
+ test_utils.TestCase):
def create_event_loop(self):
return asyncio.SelectorEventLoop(selectors.PollSelector())
@@ -1732,7 +1732,7 @@ else:
# Should always exist.
class SelectEventLoopTests(UnixEventLoopTestsMixin,
SubprocessTestsMixin,
- unittest.TestCase):
+ test_utils.TestCase):
def create_event_loop(self):
return asyncio.SelectorEventLoop(selectors.SelectSelector())