Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c55014f

Browse files
committed
issue26372 - use os.devnull instead of /dev/null
2 parents 64c26e5 + 78b642c commit c55014f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_subprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ def test_communicate_BrokenPipeError_stdin_flush(self):
12641264
stdin=subprocess.PIPE,
12651265
stdout=subprocess.PIPE)
12661266
with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin, \
1267-
open('/dev/null', 'wb') as dev_null:
1267+
open(os.devnull, 'wb') as dev_null:
12681268
mock_proc_stdin.flush.side_effect = BrokenPipeError
12691269
# because _communicate registers a selector using proc.stdin...
12701270
mock_proc_stdin.fileno.return_value = dev_null.fileno()

0 commit comments

Comments
 (0)