summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-08-23 18:38:41 (GMT)
committerSteve Dower <steve.dower@python.org>2019-08-23 18:38:41 (GMT)
commit5be666010e4df65dc4d831435cc92340ea369f94 (patch)
treea77c11ab56db4089d292ca9a4f968dd3628d5ad0 /Lib/test/test_os.py
parent8f080b09953a2d862de5c74edf414a54ea3dbea5 (diff)
downloadcpython-5be666010e4df65dc4d831435cc92340ea369f94.zip
cpython-5be666010e4df65dc4d831435cc92340ea369f94.tar.gz
cpython-5be666010e4df65dc4d831435cc92340ea369f94.tar.bz2
bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 4285931..440cd6c 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -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.