@@ -1015,7 +1015,6 @@ def test_terminate(self):
10151015 self ._kill_process ('terminate' )
10161016
10171017
1018-
10191018# The module says:
10201019# "NB This only works (and is only relevant) for UNIX."
10211020#
@@ -1042,46 +1041,6 @@ def test_getoutput(self):
10421041 if dir is not None :
10431042 os .rmdir (dir )
10441043
1045- class CommandsWithSpaces (BaseTestCase ):
1046-
1047- def setUp (self ):
1048- super ().setUp ()
1049- f , fname = mkstemp (".py" , "te st" )
1050- self .fname = fname .lower ()
1051- os .write (f , b"import sys;"
1052- b"sys.stdout.write('%d %s' % (len(sys.argv), [a.lower () for a in sys.argv]))"
1053- )
1054- os .close (f )
1055-
1056- def tearDown (self ):
1057- os .remove (self .fname )
1058- super ().tearDown ()
1059-
1060- def with_spaces (self , * args , ** kwargs ):
1061- kwargs ['stdout' ] = subprocess .PIPE
1062- p = subprocess .Popen (* args , ** kwargs )
1063- self .assertEqual (
1064- p .stdout .read ().decode ("mbcs" ),
1065- "2 [%r, 'ab cd']" % self .fname
1066- )
1067-
1068- def test_shell_string_with_spaces (self ):
1069- # call() function with string argument with spaces on Windows
1070- self .with_spaces ('"%s" "%s"' % (self .fname , "ab cd" ), shell = 1 )
1071-
1072- def test_shell_sequence_with_spaces (self ):
1073- # call() function with sequence argument with spaces on Windows
1074- self .with_spaces ([self .fname , "ab cd" ], shell = 1 )
1075-
1076- def test_noshell_string_with_spaces (self ):
1077- # call() function with string argument with spaces on Windows
1078- self .with_spaces ('"%s" "%s" "%s"' % (sys .executable , self .fname ,
1079- "ab cd" ))
1080-
1081- def test_noshell_sequence_with_spaces (self ):
1082- # call() function with sequence argument with spaces on Windows
1083- self .with_spaces ([sys .executable , self .fname , "ab cd" ])
1084-
10851044
10861045@unittest .skipUnless (getattr (subprocess , '_has_poll' , False ),
10871046 "poll system call not supported" )
@@ -1134,7 +1093,6 @@ def test_main():
11341093 Win32ProcessTestCase ,
11351094 ProcessTestCasePOSIXPurePython ,
11361095 CommandTests ,
1137- CommandsWithSpaces ,
11381096 ProcessTestCaseNoPoll ,
11391097 HelperFunctionTests )
11401098
0 commit comments