summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_subprocess.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_subprocess.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_subprocess.py')
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index 14fd17e..3b962bf 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -1,4 +1,5 @@
from asyncio import subprocess
+from asyncio import test_utils
import asyncio
import signal
import sys
@@ -151,21 +152,21 @@ if sys.platform != 'win32':
policy = asyncio.get_event_loop_policy()
policy.set_child_watcher(None)
self.loop.close()
- policy.set_event_loop(None)
+ super().tearDown()
class SubprocessSafeWatcherTests(SubprocessWatcherMixin,
- unittest.TestCase):
+ test_utils.TestCase):
Watcher = unix_events.SafeChildWatcher
class SubprocessFastWatcherTests(SubprocessWatcherMixin,
- unittest.TestCase):
+ test_utils.TestCase):
Watcher = unix_events.FastChildWatcher
else:
# Windows
- class SubprocessProactorTests(SubprocessMixin, unittest.TestCase):
+ class SubprocessProactorTests(SubprocessMixin, test_utils.TestCase):
def setUp(self):
policy = asyncio.get_event_loop_policy()
@@ -178,6 +179,7 @@ else:
policy = asyncio.get_event_loop_policy()
self.loop.close()
policy.set_event_loop(None)
+ super().tearDown()
if __name__ == '__main__':