Skip to content

Commit 4afda06

Browse files
committed
Fix a bunch of little things
1 parent 9aca27c commit 4afda06

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tests/test_process.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -161,21 +161,23 @@ def test_pause_unpause():
161161

162162

163163
@pytest.mark.parametrize('st', [
164-
('',),
165-
('foo',),
166-
('foo&bar',),
167-
('foo$?-/_"\\',),
168-
('^&<>|',),
169-
('()<>',),
170-
('this /?',),
164+
'',
165+
'foo',
166+
'foo&bar',
167+
'foo$?-/_"\\',
168+
'^&<>|',
169+
'()<>',
170+
'this /?',
171171
])
172172
def test_argv_roundtrip(st):
173-
# This is for the benefit of Windows and other platforms that don't actually pass processes a paramaterized argv
173+
# This is for the benefit of Windows and other platforms that don't actually
174+
# pass processes a paramaterized argv
174175
pi = Pipe()
175176
proc = Process(runpy(r'import sys; print(sys.argv[1])') + [st], stdout=pi.side_in)
176177
proc.start()
177178
data = pi.side_out.readline()
178179
# Pipe is closed but process might still be live
179180
proc.join() # Commenting this out causes data to be None?
180181
assert proc.return_code == 0
181-
assert data.rstrip('\r\n') == st
182+
assert data.rstrip(b'\r\n') == st.encode('ascii')
183+
# We're not testing 8-bit clean, but special chars, which are all ascii

0 commit comments

Comments
 (0)