]> granicus.if.org Git - python/commitdiff
issue26372 - use os.devnull instead of /dev/null
authorGregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) <greg@krypto.org>
Sat, 4 Jun 2016 19:04:43 +0000 (19:04 +0000)
committerGregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) <greg@krypto.org>
Sat, 4 Jun 2016 19:04:43 +0000 (19:04 +0000)
Lib/test/test_subprocess.py

index a5ecf67caedffd7f033e1518a57e6dd2437d9672..9e44ee3c6b3ae6c1fdddb9a83069513492b54daf 100644 (file)
@@ -1267,7 +1267,7 @@ class ProcessTestCase(BaseTestCase):
                                 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()