diff options
author | Brandt Bucher <brandtbucher@gmail.com> | 2019-06-27 09:10:57 -0700 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2019-06-27 09:10:57 -0700 |
commit | 45a30af109f69a81576b87ea775863ba12d55316 (patch) | |
tree | 34578343231581130fcbd09f49ccebcdb529fdd9 /Lib/test/test_posix.py | |
parent | 97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9 (diff) | |
download | cpython-git-45a30af109f69a81576b87ea775863ba12d55316.tar.gz |
closes bpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r-- | Lib/test/test_posix.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index afa1398d4e..9bdd2848af 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -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) |