summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_posix.py
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2011-09-09 23:16:55 (GMT)
committerJesus Cea <jcea@jcea.es>2011-09-09 23:16:55 (GMT)
commitceb5d169e97201b870a8400bb9c67036c3c53969 (patch)
tree0fea6cf1174ee1fb33c688199f74017bc7c971e2 /Lib/test/test_posix.py
parentf2cb4e8b35ead656a86902c00bc6bc293533d89f (diff)
downloadcpython-ceb5d169e97201b870a8400bb9c67036c3c53969.zip
cpython-ceb5d169e97201b870a8400bb9c67036c3c53969.tar.gz
cpython-ceb5d169e97201b870a8400bb9c67036c3c53969.tar.bz2
Better fix for #12763: test_posix failure on OpenIndiana
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r--Lib/test/test_posix.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 1af6cf4..f70688d 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -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)