mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use os.devnull instead of hardcoded '/dev/null'.
This commit is contained in:
commit
5fd174a78d
4 changed files with 12 additions and 12 deletions
|
@ -1922,7 +1922,7 @@ class POSIXProcessTestCase(BaseTestCase):
|
|||
open_fds = set(fds)
|
||||
# add a bunch more fds
|
||||
for _ in range(9):
|
||||
fd = os.open("/dev/null", os.O_RDONLY)
|
||||
fd = os.open(os.devnull, os.O_RDONLY)
|
||||
self.addCleanup(os.close, fd)
|
||||
open_fds.add(fd)
|
||||
|
||||
|
@ -1984,7 +1984,7 @@ class POSIXProcessTestCase(BaseTestCase):
|
|||
open_fds = set()
|
||||
# Add a bunch more fds to pass down.
|
||||
for _ in range(40):
|
||||
fd = os.open("/dev/null", os.O_RDONLY)
|
||||
fd = os.open(os.devnull, os.O_RDONLY)
|
||||
open_fds.add(fd)
|
||||
|
||||
# Leave a two pairs of low ones available for use by the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue