mirror of
https://github.com/python/cpython.git
synced 2025-08-16 14:50:43 +00:00
closes bpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)
(cherry picked from commit 45a30af109
)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
This commit is contained in:
parent
4cbe7a3ce4
commit
6fbed5350c
3 changed files with 6 additions and 0 deletions
|
@ -1368,6 +1368,7 @@ class PosixTester(unittest.TestCase):
|
|||
self.assertEqual(posix.sched_getaffinity(0), mask)
|
||||
self.assertRaises(OSError, posix.sched_setaffinity, 0, [])
|
||||
self.assertRaises(ValueError, posix.sched_setaffinity, 0, [-10])
|
||||
self.assertRaises(ValueError, posix.sched_setaffinity, 0, map(int, "0X"))
|
||||
self.assertRaises(OverflowError, posix.sched_setaffinity, 0, [1<<128])
|
||||
self.assertRaises(OSError, posix.sched_setaffinity, -1, mask)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue