Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Lib/test/test_os/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def testNoArgFunctions(self):
NO_ARG_FUNCTIONS = [ "ctermid", "getcwd", "getcwdb", "uname",
"times", "getloadavg",
"getegid", "geteuid", "getgid", "getgroups",
"getpid", "getpgrp", "getppid", "getuid", "sync",
"getpid", "getpgrp", "getppid", "getuid",
]

for name in NO_ARG_FUNCTIONS:
Expand All @@ -81,6 +81,13 @@ def testNoArgFunctions(self):
posix_func()
self.assertRaises(TypeError, posix_func, 1)

# gh-102184: sync() can block for a long time.
@support.requires_resource('walltime')
@unittest.skipUnless(hasattr(posix, 'sync'), 'test needs posix.sync()')
def test_sync(self):
posix.sync()
self.assertRaises(TypeError, posix.sync, 1)

@unittest.skipUnless(hasattr(posix, 'getresuid'),
'test needs posix.getresuid()')
def test_getresuid(self):
Expand Down
Loading