This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients Michael.Felt, steve.dower, vstinner
Date 2019-04-23.15:53:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556034812.27.0.620139702453.issue36624@roundup.psfhosted.org>
In-reply-to
Content
> Being 'runtime' rather than 'buildtime' seemed more precise - tests that
> are not meant to be build-time dependent use run-time status while
> leaving sys.platform for concerns that are directly related to builds

This is a good point - perhaps we need both?

Many of the current test skips are related to build-time switches, but indeed, some relate to the runtime environment.

One aspect I'm keeping in mind here is that with the Windows Subsystem for Linux, many lines are becoming blurred with respect to which build of Python people are using (I'm already getting bug reports from people who thought they were getting the Windows build but actually the Linux one, or vice versa). And mismatching builds causes some weird problems. Being able to clearly identify "Windows build + WSL environment" or "Linux build + WSL environment" will likely matter more over time.

It would be nice to have all the checks centralized, perhaps a set of decorators in a test.requires module?

@test.requires.linux_platform
@test.requires.darwin_platform
@test.requires.macos_runtime(10, 9)
def test_my_test(self): ...

(It would require some clever decorator design, but we can make those work like "ORs" rather than "ANDs".)

Does it provide any benefit? I think it's clever, but that doesn't mean it's worthwhile :) Using skipIf and skipUnless with test.support.CONSTANTS is just as readable and just as obvious (once we're using them consistently).

<End brainstorming>
History
Date User Action Args
2019-04-23 15:53:32steve.dowersetrecipients: + steve.dower, vstinner, Michael.Felt
2019-04-23 15:53:32steve.dowersetmessageid: <1556034812.27.0.620139702453.issue36624@roundup.psfhosted.org>
2019-04-23 15:53:32steve.dowerlinkissue36624 messages
2019-04-23 15:53:31steve.dowercreate