diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-08-02 23:07:32 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-08-02 23:07:32 (GMT) |
commit | c5fce4ded24da1624abf6574ed0dbf762a5079e8 (patch) | |
tree | 2714f1b7458d8043c686d0c579e386e473e52726 /Lib | |
parent | 28da7b8bea6da1b75a1603b384393fd1394359a7 (diff) | |
download | cpython-c5fce4ded24da1624abf6574ed0dbf762a5079e8.zip cpython-c5fce4ded24da1624abf6574ed0dbf762a5079e8.tar.gz cpython-c5fce4ded24da1624abf6574ed0dbf762a5079e8.tar.bz2 |
check individually for some for sched_ functions
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_posix.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 1c2a4da..a0fefbc 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -851,7 +851,7 @@ class PosixTester(unittest.TestCase): self.assertRaises(OSError, posix.sched_get_priority_min, -23) self.assertRaises(OSError, posix.sched_get_priority_max, -23) - @requires_sched_h + @unittest.skipUnless(hasattr(posix, 'sched_setscheduler'), "can't change scheduler") def test_get_and_set_scheduler_and_param(self): possible_schedulers = [sched for name, sched in posix.__dict__.items() if name.startswith("SCHED_")] @@ -882,7 +882,7 @@ class PosixTester(unittest.TestCase): param = posix.sched_param(sched_priority=-large) self.assertRaises(OverflowError, posix.sched_setparam, 0, param) - @requires_sched_h + @unittest.skipUnless(hasattr(posix, "sched_rr_get_interval"), "no function") def test_sched_rr_get_interval(self): interval = posix.sched_rr_get_interval(0) self.assertIsInstance(interval, float) |