(original) (raw)
changeset: 101705:3a560525ca50 branch: 3.5 parent: 101703:74ad78d2dd8d user: Gregory P. Smith greg@krypto.org [Google Inc.] date: Sat Jun 04 19:04:43 2016 +0000 files: Lib/test/test_subprocess.py description: issue26372 - use os.devnull instead of /dev/null diff -r 74ad78d2dd8d -r 3a560525ca50 Lib/test/test_subprocess.py --- a/Lib/test/test_subprocess.py Sat Jun 04 20:32:36 2016 +0300 +++ b/Lib/test/test_subprocess.py Sat Jun 04 19:04:43 2016 +0000 @@ -1267,7 +1267,7 @@ stdin=subprocess.PIPE, stdout=subprocess.PIPE) with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin, \ - open('/dev/null', 'wb') as dev_null: + open(os.devnull, 'wb') as dev_null: mock_proc_stdin.flush.side_effect = BrokenPipeError # because _communicate registers a selector using proc.stdin... mock_proc_stdin.fileno.return_value = dev_null.fileno() /greg@krypto.org