Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50ba271 commit 43234abCopy full SHA for 43234ab
1 file changed
Lib/test/test_posix.py
@@ -890,7 +890,14 @@ def test_get_and_set_scheduler_and_param(self):
890
891
@unittest.skipUnless(hasattr(posix, "sched_rr_get_interval"), "no function")
892
def test_sched_rr_get_interval(self):
893
- interval = posix.sched_rr_get_interval(0)
+ try:
894
+ interval = posix.sched_rr_get_interval(0)
895
+ except OSError as e:
896
+ # This likely means that sched_rr_get_interval is only valid for
897
+ # processes with the SCHED_RR scheduler in effect.
898
+ if e.errno != errno.EINVAL:
899
+ raise
900
+ self.skipTest("only works on SCHED_RR processes")
901
self.assertIsInstance(interval, float)
902
# Reasonable constraints, I think.
903
self.assertGreaterEqual(interval, 0.)
0 commit comments