bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)
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 @@
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.