Skip to content

Commit 4f22675

Browse files
committed
improve the assert for test_one_environment_variable
1 parent c31be58 commit 4f22675

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_subprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ def test_one_environment_variable(self):
844844
cmd = ["CMD", "/c", "SET", "fruit"]
845845
with subprocess.Popen(cmd, stdout=subprocess.PIPE, env=newenv) as p:
846846
stdout, _ = p.communicate()
847-
self.assertTrue(stdout.startswith(b"fruit=orange"))
847+
self.assertEqual(stdout.strip(), b"fruit=orange")
848848

849849
def test_invalid_cmd(self):
850850
# null character in the command name

0 commit comments

Comments
 (0)