New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-34685: Skip posix_spawn scheduler tests on BSD #9316
Conversation
Check issue for the rationale |
Lib/test/test_posix.py
Outdated
@@ -1660,14 +1660,17 @@ def test_setsigdef_wrong_type(self): | |||
|
|||
@requires_sched | |||
def test_setscheduler_only_param(self): | |||
if sys.platform.startswith(('freebsd', 'netbsd', 'openbsd', 'gnukfreebsd')): | |||
raise unittest.SkipTest("test may fail on BSD") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already skip a similar test on FreeBSD and NetBSD:
# POSIX states that calling sched_setparam() or sched_setscheduler() on
# a process with a scheduling policy other than SCHED_FIFO or SCHED_RR
# is implementation-defined: NetBSD and FreeBSD can return EINVAL.
if not sys.platform.startswith(('freebsd', 'netbsd')):
See commit b402a5c.
Please use the decorator, skipIf or skipUnless:
@unittest.skipUnless(sys.platform == 'win32',
'test specific to the Windows console')
Please also mention the bpo number in the skip message: "bpo-34685: " prefix.
When you're done making the requested changes, leave the comment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
https://bugs.python.org/issue34685