There was an error while loading. Please reload this page.
1 parent 45130bf commit c91586bCopy full SHA for c91586b
1 file changed
Lib/test/test_os/test_posix.py
@@ -71,7 +71,7 @@ def testNoArgFunctions(self):
71
NO_ARG_FUNCTIONS = [ "ctermid", "getcwd", "getcwdb", "uname",
72
"times", "getloadavg",
73
"getegid", "geteuid", "getgid", "getgroups",
74
- "getpid", "getpgrp", "getppid", "getuid", "sync",
+ "getpid", "getpgrp", "getppid", "getuid",
75
]
76
77
for name in NO_ARG_FUNCTIONS:
@@ -81,6 +81,13 @@ def testNoArgFunctions(self):
81
posix_func()
82
self.assertRaises(TypeError, posix_func, 1)
83
84
+ # gh-102184: sync() can block for a long time.
85
+ @support.requires_resource('walltime')
86
+ @unittest.skipUnless(hasattr(posix, 'sync'), 'test needs posix.sync()')
87
+ def test_sync(self):
88
+ posix.sync()
89
+ self.assertRaises(TypeError, posix.sync, 1)
90
+
91
@unittest.skipUnless(hasattr(posix, 'getresuid'),
92
'test needs posix.getresuid()')
93
def test_getresuid(self):
0 commit comments