summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_genericpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_genericpath.py')
-rw-r--r--Lib/test/test_genericpath.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py
index ebb8396..fc3d44c 100644
--- a/Lib/test/test_genericpath.py
+++ b/Lib/test/test_genericpath.py
@@ -146,6 +146,16 @@ class GenericTest(unittest.TestCase):
f.close()
support.unlink(support.TESTFN)
+ @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
+ def test_exists_fd(self):
+ r, w = os.pipe()
+ try:
+ self.assertTrue(self.pathmodule.exists(r))
+ finally:
+ os.close(r)
+ os.close(w)
+ self.assertFalse(self.pathmodule.exists(r))
+
def test_isdir(self):
self.assertIs(self.pathmodule.isdir(support.TESTFN), False)
f = open(support.TESTFN, "wb")