summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-06-27 16:45:30 (GMT)
committerGitHub <noreply@github.com>2019-06-27 16:45:30 (GMT)
commit6fbed5350c786ab88868925d67f59e19d0ab841c (patch)
treedde00f33e5557bbe181806439f144458b8da5ae9 /Lib
parent4cbe7a3ce4a46a5a2f3e56055a665e583fead62d (diff)
downloadcpython-6fbed5350c786ab88868925d67f59e19d0ab841c.zip
cpython-6fbed5350c786ab88868925d67f59e19d0ab841c.tar.gz
cpython-6fbed5350c786ab88868925d67f59e19d0ab841c.tar.bz2
closes bpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)
(cherry picked from commit 45a30af109f69a81576b87ea775863ba12d55316) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_posix.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index afa1398..9bdd284 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)