Skip to content

Commit 658e4f2

Browse files
committed
test_io: ignore None in data received from pipe
Filter None items in the received list to allow join() to convert it into a string.
1 parent 6518165 commit 658e4f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_io.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4230,7 +4230,7 @@ def _test_nonblock_pipe_write(self, bufsize):
42304230

42314231
received += iter(rf.read, None)
42324232

4233-
sent, received = b''.join(sent), b''.join(received)
4233+
sent, received = b''.join(sent), b''.join(filter(None, received))
42344234
self.assertEqual(sent, received)
42354235
self.assertTrue(wf.closed)
42364236
self.assertTrue(rf.closed)

0 commit comments

Comments
 (0)