mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-71052: Add test exclusions to support running the test suite on Android (#115918)
This commit is contained in:
parent
83c5ecdeec
commit
41d5391c55
12 changed files with 58 additions and 27 deletions
|
@ -1270,9 +1270,10 @@ class PosixTester(unittest.TestCase):
|
|||
self.assertIn(mine, possible_schedulers)
|
||||
try:
|
||||
parent = posix.sched_getscheduler(os.getppid())
|
||||
except OSError as e:
|
||||
if e.errno != errno.EPERM:
|
||||
raise
|
||||
except PermissionError:
|
||||
# POSIX specifies EPERM, but Android returns EACCES. Both errno
|
||||
# values are mapped to PermissionError.
|
||||
pass
|
||||
else:
|
||||
self.assertIn(parent, possible_schedulers)
|
||||
self.assertRaises(OSError, posix.sched_getscheduler, -1)
|
||||
|
@ -1287,9 +1288,8 @@ class PosixTester(unittest.TestCase):
|
|||
try:
|
||||
posix.sched_setscheduler(0, mine, param)
|
||||
posix.sched_setparam(0, param)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EPERM:
|
||||
raise
|
||||
except PermissionError:
|
||||
pass
|
||||
self.assertRaises(OSError, posix.sched_setparam, -1, param)
|
||||
|
||||
self.assertRaises(OSError, posix.sched_setscheduler, -1, mine, param)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue