@@ -110,7 +110,11 @@ def test_basic(self, tmpdir):
110
110
'arg5 a\\ \\ b' ,
111
111
]
112
112
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" ,
114
118
)
115
119
stdout , stderr = proc .communicate ('hello\n world\n ' )
116
120
actual = stdout .replace ('\r \n ' , '\n ' )
@@ -143,7 +147,11 @@ def test_symlink(self, tmpdir):
143
147
'arg5 a\\ \\ b' ,
144
148
]
145
149
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" ,
147
155
)
148
156
stdout , stderr = proc .communicate ('hello\n world\n ' )
149
157
actual = stdout .replace ('\r \n ' , '\n ' )
@@ -191,6 +199,7 @@ def test_with_options(self, tmpdir):
191
199
stdin = subprocess .PIPE ,
192
200
stderr = subprocess .STDOUT ,
193
201
text = True ,
202
+ encoding = "utf-8" ,
194
203
)
195
204
stdout , stderr = proc .communicate ()
196
205
actual = stdout .replace ('\r \n ' , '\n ' )
@@ -240,6 +249,7 @@ def test_basic(self, tmpdir):
240
249
stdin = subprocess .PIPE ,
241
250
stderr = subprocess .STDOUT ,
242
251
text = True ,
252
+ encoding = "utf-8" ,
243
253
)
244
254
stdout , stderr = proc .communicate ()
245
255
assert not stdout
0 commit comments