# Since Python is a console process, it won't be affected
# by wShowWindow, but the argument should be silently
# ignored
- subprocess.call(ZERO_RETURN_CMD,
- startupinfo=startupinfo)
+ rc = subprocess.call(ZERO_RETURN_CMD,
+ startupinfo=startupinfo)
+ self.assertEqual(rc, 0)
def test_startupinfo_keywords(self):
# startupinfo argument
# Since Python is a console process, it won't be affected
# by wShowWindow, but the argument should be silently
# ignored
- subprocess.call(ZERO_RETURN_CMD,
- startupinfo=startupinfo)
+ rc = subprocess.call(ZERO_RETURN_CMD,
+ startupinfo=startupinfo)
+ self.assertEqual(rc, 0)
def test_startupinfo_copy(self):
# bpo-34044: Popen must not modify input STARTUPINFO structure
def test_empty_attribute_list(self):
startupinfo = subprocess.STARTUPINFO()
startupinfo.lpAttributeList = {}
- subprocess.call(ZERO_RETURN_CMD,
- startupinfo=startupinfo)
+ rc = subprocess.call(ZERO_RETURN_CMD,
+ startupinfo=startupinfo)
+ self.assertEqual(rc, 0)
def test_empty_handle_list(self):
startupinfo = subprocess.STARTUPINFO()
startupinfo.lpAttributeList = {"handle_list": []}
- subprocess.call(ZERO_RETURN_CMD,
- startupinfo=startupinfo)
+ rc = subprocess.call(ZERO_RETURN_CMD,
+ startupinfo=startupinfo)
+ self.assertEqual(rc, 0)
def test_shell_sequence(self):
# Run command through the shell (sequence)
env=newenv)
with p:
self.assertIn(b"physalis", p.stdout.read())
+ p.communicate()
+ self.assertEqual(p.returncode, 0)
def test_shell_string(self):
# Run command through the shell (string)
env=newenv)
with p:
self.assertIn(b"physalis", p.stdout.read())
+ p.communicate()
+ self.assertEqual(p.returncode, 0)
def test_shell_encodings(self):
# Run command through the shell (string)
encoding=enc)
with p:
self.assertIn("physalis", p.stdout.read(), enc)
+ p.communicate()
+ self.assertEqual(p.returncode, 0)
def test_call_string(self):
# call() function with string argument on Windows