summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-08-08 19:08:44 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-08-08 19:08:44 (GMT)
commit1a0a737b131b5c54ba32a8dc707db39b4ce03674 (patch)
tree2b14b288bf5b1d6a8f54b0fcd4c768f764e2b3ef /Lib/test/test_subprocess.py
parent4eb5fa56e4b84a3a76ddc9487f19764dfab52a7f (diff)
downloadcpython-1a0a737b131b5c54ba32a8dc707db39b4ce03674.zip
cpython-1a0a737b131b5c54ba32a8dc707db39b4ce03674.tar.gz
cpython-1a0a737b131b5c54ba32a8dc707db39b4ce03674.tar.bz2
revert r83830, breaks tests on unixes
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index c4bef9e..95da107 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1015,7 +1015,6 @@ class Win32ProcessTestCase(BaseTestCase):
self._kill_process('terminate')
-
# The module says:
# "NB This only works (and is only relevant) for UNIX."
#
@@ -1042,46 +1041,6 @@ class CommandTests(unittest.TestCase):
if dir is not None:
os.rmdir(dir)
-class CommandsWithSpaces (BaseTestCase):
-
- def setUp(self):
- super().setUp()
- f, fname = mkstemp(".py", "te st")
- self.fname = fname.lower ()
- os.write(f, b"import sys;"
- b"sys.stdout.write('%d %s' % (len(sys.argv), [a.lower () for a in sys.argv]))"
- )
- os.close(f)
-
- def tearDown(self):
- os.remove(self.fname)
- super().tearDown()
-
- def with_spaces(self, *args, **kwargs):
- kwargs['stdout'] = subprocess.PIPE
- p = subprocess.Popen(*args, **kwargs)
- self.assertEqual(
- p.stdout.read ().decode("mbcs"),
- "2 [%r, 'ab cd']" % self.fname
- )
-
- def test_shell_string_with_spaces(self):
- # call() function with string argument with spaces on Windows
- self.with_spaces('"%s" "%s"' % (self.fname, "ab cd"), shell=1)
-
- def test_shell_sequence_with_spaces(self):
- # call() function with sequence argument with spaces on Windows
- self.with_spaces([self.fname, "ab cd"], shell=1)
-
- def test_noshell_string_with_spaces(self):
- # call() function with string argument with spaces on Windows
- self.with_spaces('"%s" "%s" "%s"' % (sys.executable, self.fname,
- "ab cd"))
-
- def test_noshell_sequence_with_spaces(self):
- # call() function with sequence argument with spaces on Windows
- self.with_spaces([sys.executable, self.fname, "ab cd"])
-
@unittest.skipUnless(getattr(subprocess, '_has_poll', False),
"poll system call not supported")
@@ -1134,7 +1093,6 @@ def test_main():
Win32ProcessTestCase,
ProcessTestCasePOSIXPurePython,
CommandTests,
- CommandsWithSpaces,
ProcessTestCaseNoPoll,
HelperFunctionTests)