mirror of
https://github.com/python/cpython.git
synced 2024-12-02 22:35:26 +08:00
issue26372 - use os.devnull instead of /dev/null
This commit is contained in:
parent
64a263a1ce
commit
78b642c6b2
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user