mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)
This commit is contained in:
parent
8f080b0995
commit
5be666010e
3 changed files with 14 additions and 1 deletions
|
@ -3476,6 +3476,11 @@ class FDInheritanceTests(unittest.TestCase):
|
|||
self.addCleanup(os.close, fd2)
|
||||
self.assertEqual(os.get_inheritable(fd2), False)
|
||||
|
||||
def test_dup_standard_stream(self):
|
||||
fd = os.dup(1)
|
||||
self.addCleanup(os.close, fd)
|
||||
self.assertGreater(fd, 0)
|
||||
|
||||
@unittest.skipUnless(sys.platform == 'win32', 'win32-specific test')
|
||||
def test_dup_nul(self):
|
||||
# os.dup() was creating inheritable fds for character files.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue