Better fix for #12763: test_posix failure on OpenIndiana
This commit is contained in:
parent
f2cb4e8b35
commit
ceb5d169e9
|
@ -862,12 +862,12 @@ class PosixTester(unittest.TestCase):
|
|||
mine = posix.sched_getscheduler(0)
|
||||
self.assertIn(mine, possible_schedulers)
|
||||
try:
|
||||
init = posix.sched_getscheduler(1)
|
||||
parent = posix.sched_getscheduler(os.getppid())
|
||||
except OSError as e:
|
||||
if e.errno != errno.EPERM and e.errno != errno.ESRCH:
|
||||
if e.errno != errno.EPERM:
|
||||
raise
|
||||
else:
|
||||
self.assertIn(init, possible_schedulers)
|
||||
self.assertIn(parent, possible_schedulers)
|
||||
self.assertRaises(OSError, posix.sched_getscheduler, -1)
|
||||
self.assertRaises(OSError, posix.sched_getparam, -1)
|
||||
param = posix.sched_getparam(0)
|
||||
|
|
Loading…
Reference in New Issue