[Python-checkins] cpython (merge 3.5 -> default): 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/52e331b86f2b
changeset: 101706:52e331b86f2b
parent: 101704:f993dbeb2ad2
parent: 101705:3a560525ca50
user: Gregory P. Smith <greg at krypto.org> [Google Inc.]
date: Sat Jun 04 19:05:17 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
@@ -1264,7 +1264,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 によって変換されたページ (->オリジナル) /