Skip to content

Commit d9f6410

Browse files
committed
fix pathconf test
1 parent d57be54 commit d9f6410

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/test/test_os/test_os.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2785,13 +2785,14 @@ def check_for_ebadf(self, errnos=(errno.EBADF,)):
27852785
self.assertIn(ctx.exception.errno, errnos)
27862786

27872787
@unittest.skipUnless(hasattr(os, 'pathconf'), 'test needs os.pathconf()')
2788-
@unittest.skipUnless(os.pathconf in os.supports_fd,
2789-
'needs fpathconf()')
27902788
@unittest.skipIf(
27912789
support.linked_to_musl(),
27922790
'musl fpathconf ignores the file descriptor and returns a constant',
27932791
)
27942792
def test_pathconf_negative_fd_uses_fd_semantics(self):
2793+
if os.pathconf not in os.supports_fd:
2794+
self.skipTest('needs fpathconf()')
2795+
27952796
with self.check_for_ebadf():
27962797
os.pathconf(-1, 1)
27972798

0 commit comments

Comments
 (0)