-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorstatus: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictopic: marksrelated to marks, either the general marks or builtinrelated to marks, either the general marks or builtintype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarificationtype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branchtype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Description
One can currently write:
@pytest.xfail("sys.platform == 'darwin'")
But not
@pytest.xfail("platform.platform() == 'Darwin'")
If one tries that, an error is raised:
Error evaluating 'xfail' expression
platform.platform() == "Darwin"
NameError: name 'platform' is not defined
It seems reasonable to me the platform
module should be exposed in the namespace for these conditional methods for the same reason sys
is.
I searched but could not find an existing issue or even a definition of what these conditional expressions are guaranteed to support, so I hope this is not a duplicate report.
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorstatus: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictopic: marksrelated to marks, either the general marks or builtinrelated to marks, either the general marks or builtintype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarificationtype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branchtype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature