Skip to content

Commit b341011

Browse files
Avasamabravalheri
authored andcommitted
Fix Windows issue
1 parent b69c0de commit b341011

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

setuptools/tests/test_windows_wrappers.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ def test_basic(self, tmpdir):
110110
'arg5 a\\\\b',
111111
]
112112
proc = subprocess.Popen(
113-
cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, text=True
113+
cmd,
114+
stdout=subprocess.PIPE,
115+
stdin=subprocess.PIPE,
116+
text=True,
117+
encoding="utf-8",
114118
)
115119
stdout, stderr = proc.communicate('hello\nworld\n')
116120
actual = stdout.replace('\r\n', '\n')
@@ -143,7 +147,11 @@ def test_symlink(self, tmpdir):
143147
'arg5 a\\\\b',
144148
]
145149
proc = subprocess.Popen(
146-
cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, text=True
150+
cmd,
151+
stdout=subprocess.PIPE,
152+
stdin=subprocess.PIPE,
153+
text=True,
154+
encoding="utf-8",
147155
)
148156
stdout, stderr = proc.communicate('hello\nworld\n')
149157
actual = stdout.replace('\r\n', '\n')
@@ -191,6 +199,7 @@ def test_with_options(self, tmpdir):
191199
stdin=subprocess.PIPE,
192200
stderr=subprocess.STDOUT,
193201
text=True,
202+
encoding="utf-8",
194203
)
195204
stdout, stderr = proc.communicate()
196205
actual = stdout.replace('\r\n', '\n')
@@ -240,6 +249,7 @@ def test_basic(self, tmpdir):
240249
stdin=subprocess.PIPE,
241250
stderr=subprocess.STDOUT,
242251
text=True,
252+
encoding="utf-8",
243253
)
244254
stdout, stderr = proc.communicate()
245255
assert not stdout

0 commit comments

Comments
 (0)