Closes #15161: add support for giving path as a fd for truncate() and pathconf().

This commit is contained in:
Georg Brandl 2012-06-24 12:55:33 +02:00
parent 8ccadaafe6
commit 306336bcda
4 changed files with 76 additions and 22 deletions

View file

@ -1084,10 +1084,12 @@ class TestInvalidFD(unittest.TestCase):
def test_fpathconf(self):
if hasattr(os, "fpathconf"):
self.check(os.pathconf, "PC_NAME_MAX")
self.check(os.fpathconf, "PC_NAME_MAX")
def test_ftruncate(self):
if hasattr(os, "ftruncate"):
self.check(os.truncate, 0)
self.check(os.ftruncate, 0)
def test_lseek(self):