]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
OSX doesn't check sched_get_priority_(min/max) argument
authorBenjamin Peterson <benjamin@python.org>
Wed, 3 Aug 2011 03:09:37 +0000 (22:09 -0500)
committerBenjamin Peterson <benjamin@python.org>
Wed, 3 Aug 2011 03:09:37 +0000 (22:09 -0500)
Lib/test/test_posix.py

index 3fe791b01182faae22cd6b3a96556c7b6d587a14..e43379e9eb7794a17fa775524a4746f85271f28b 100644 (file)
@@ -848,8 +848,10 @@ class PosixTester(unittest.TestCase):
         self.assertIsInstance(lo, int)
         self.assertIsInstance(hi, int)
         self.assertGreaterEqual(hi, lo)
-        self.assertRaises(OSError, posix.sched_get_priority_min, -23)
-        self.assertRaises(OSError, posix.sched_get_priority_max, -23)
+        # OSX evidently just returns 15 without checking the argument.
+        if sys.platform != "darwin":
+               self.assertRaises(OSError, posix.sched_get_priority_min, -23)
+               self.assertRaises(OSError, posix.sched_get_priority_max, -23)
 
     @unittest.skipUnless(hasattr(posix, 'sched_setscheduler'), "can't change scheduler")
     def test_get_and_set_scheduler_and_param(self):