diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_fcntl.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py index 5d4abe3..38097db 100644 --- a/Lib/test/test_fcntl.py +++ b/Lib/test/test_fcntl.py @@ -144,6 +144,12 @@ class TestFcntl(unittest.TestCase): self.assertRaises(OverflowError, fcntl.flock, _testcapi.INT_MAX+1, fcntl.LOCK_SH) + @unittest.skipIf(sys.platform != 'darwin', "F_GETPATH is only available on macos") + def test_fcntl_f_getpath(self): + self.f = open(TESTFN, 'wb') + abspath = os.path.abspath(TESTFN) + res = fcntl.fcntl(self.f.fileno(), fcntl.F_GETPATH, bytes(len(abspath))) + self.assertEqual(abspath, res.decode('utf-8')) def test_main(): run_unittest(TestFcntl) |