Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Lib/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -4132,8 +4132,10 @@ def test_getoutput(self):
try:
dir = tempfile.mkdtemp()
name = os.path.join(dir, "foo")
# The message comes from the shell in the console code page,
# which need not be the encoding getstatusoutput() uses.
status, output = subprocess.getstatusoutput(
("type " if mswindows else "cat ") + name)
("type " if mswindows else "cat ") + name, errors="replace")
self.assertNotEqual(status, 0)
finally:
if dir is not None:
Expand Down
Loading