Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Sep 14, 2018

@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting merge labels Sep 14, 2018
@pablogsal pablogsal changed the title bpo-3468: Skip posix_spawn scheduler tests on BSD bpo-34685: Skip posix_spawn scheduler tests on BSD Sep 14, 2018
@pablogsal
Copy link
Member Author

Check issue for the rationale

@requires_sched
def test_setscheduler_only_param(self):
if sys.platform.startswith(('freebsd', 'netbsd', 'openbsd', 'gnukfreebsd')):
raise unittest.SkipTest("test may fail on BSD")
Copy link
Member

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.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@pablogsal pablogsal merged commit 3d18b50 into python:master Sep 14, 2018
@pablogsal pablogsal deleted the bpo34685 branch September 14, 2018 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants