summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_streams.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_streams.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_streams.py')
-rw-r--r--Lib/test/test_asyncio/test_streams.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index 1ecc8eb..73a375a 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -15,13 +15,13 @@ import asyncio
from asyncio import test_utils
-class StreamReaderTests(unittest.TestCase):
+class StreamReaderTests(test_utils.TestCase):
DATA = b'line1\nline2\nline3\n'
def setUp(self):
self.loop = asyncio.new_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
@@ -29,6 +29,7 @@ class StreamReaderTests(unittest.TestCase):
self.loop.close()
gc.collect()
+ super().tearDown()
@mock.patch('asyncio.streams.events')
def test_ctor_global_loop(self, m_events):