diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index b26a9359b0a19b..8a4d598a8f70bc 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3325,7 +3325,8 @@ def test_set_get_priority(self): os.setpriority(os.PRIO_PROCESS, os.getpid(), base + 1) try: new_prio = os.getpriority(os.PRIO_PROCESS, os.getpid()) - if base >= 19 and new_prio <= 19: + # nice value cap is 19 for linux and 20 for FreeBSD + if base >= 19 and new_prio <= base: raise unittest.SkipTest("unable to reliably test setpriority " "at current nice level of %s" % base) else: