diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/os.py | 2 | ||||
-rw-r--r-- | Lib/test/test_os.py | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -172,8 +172,10 @@ if _exists("_have_functions"): _add("HAVE_FDOPENDIR", "listdir") _add("HAVE_FEXECVE", "execve") _set.add(stat) # fstat always works + _add("HAVE_FTRUNCATE", "truncate") _add("HAVE_FUTIMENS", "utime") _add("HAVE_FUTIMES", "utime") + _add("HAVE_FPATHCONF", "pathconf") if _exists("statvfs") and _exists("fstatvfs"): # mac os x10.3 _add("HAVE_FSTATVFS", "statvfs") supports_fd = _set diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 654dd23..62a7dad 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -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): |