[Python-checkins] cpython (3.5): issue26372 - use os.devnull instead of /dev/null

gregory.p.smith python-checkins at python.org
Sat Jun 4 15:05:30 EDT 2016


https://hg.python.org/cpython/rev/3a560525ca50
changeset: 101705:3a560525ca50
branch: 3.5
parent: 101703:74ad78d2dd8d
user: Gregory P. Smith <greg at krypto.org> [Google Inc.]
date: Sat Jun 04 19:04:43 2016 +0000
summary:
 issue26372 - use os.devnull instead of /dev/null
files:
 Lib/test/test_subprocess.py | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -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()
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /