Issue #12871: sched_get_priority_(min|max) might not be defined even though

<sched.h> is available (most notably on OpenBSD when built without pthread):
add an explicit configure check.
This commit is contained in:
Charles-François Natali 2011-09-06 19:03:35 +02:00
parent e0afb16a31
commit ea0d5fcb4a
5 changed files with 299 additions and 309 deletions

View file

@ -840,6 +840,8 @@ class PosixTester(unittest.TestCase):
posix.sched_yield()
@requires_sched_h
@unittest.skipUnless(hasattr(posix, 'sched_get_priority_max'),
"requires sched_get_priority_max()")
def test_sched_priority(self):
# Round-robin usually has interesting priorities.
pol = posix.SCHED_RR