[Python-checkins] cpython (merge 3.5 -> default): Merge subprocess test from 3.5
martin.panter
python-checkins at python.org
Sat Apr 16 08:12:39 EDT 2016
https://hg.python.org/cpython/rev/ebb1a16de89b
changeset: 101011:ebb1a16de89b
parent: 101008:ddc4d837a0b7
parent: 101010:cb38866e4c13
user: Martin Panter <vadmium+py at gmail.com>
date: Sat Apr 16 11:51:31 2016 +0000
summary:
Merge subprocess test from 3.5
files:
Lib/test/test_subprocess.py | 29 ++++++++++++------------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -2518,7 +2518,7 @@
def test_terminate_dead(self):
self._kill_dead_process('terminate')
-class CommandTests(unittest.TestCase):
+class MiscTests(unittest.TestCase):
def test_getoutput(self):
self.assertEqual(subprocess.getoutput('echo xyzzy'), 'xyzzy')
self.assertEqual(subprocess.getstatusoutput('echo xyzzy'),
@@ -2538,19 +2538,6 @@
if dir is not None:
os.rmdir(dir)
-
- at unittest.skipUnless(hasattr(selectors, 'PollSelector'),
- "Test needs selectors.PollSelector")
-class ProcessTestCaseNoPoll(ProcessTestCase):
- def setUp(self):
- self.orig_selector = subprocess._PopenSelector
- subprocess._PopenSelector = selectors.SelectSelector
- ProcessTestCase.setUp(self)
-
- def tearDown(self):
- subprocess._PopenSelector = self.orig_selector
- ProcessTestCase.tearDown(self)
-
def test__all__(self):
"""Ensure that __all__ is populated properly."""
intentionally_excluded = set(("list2cmdline",))
@@ -2566,6 +2553,18 @@
self.assertEqual(exported, possible_exports - intentionally_excluded)
+ at unittest.skipUnless(hasattr(selectors, 'PollSelector'),
+ "Test needs selectors.PollSelector")
+class ProcessTestCaseNoPoll(ProcessTestCase):
+ def setUp(self):
+ self.orig_selector = subprocess._PopenSelector
+ subprocess._PopenSelector = selectors.SelectSelector
+ ProcessTestCase.setUp(self)
+
+ def tearDown(self):
+ subprocess._PopenSelector = self.orig_selector
+ ProcessTestCase.tearDown(self)
+
@unittest.skipUnless(mswindows, "Windows-specific tests")
class CommandsWithSpaces (BaseTestCase):
@@ -2669,7 +2668,7 @@
unit_tests = (ProcessTestCase,
POSIXProcessTestCase,
Win32ProcessTestCase,
- CommandTests,
+ MiscTests,
ProcessTestCaseNoPoll,
CommandsWithSpaces,
ContextManagerTests,
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list