-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Feature: Don't "skip" this file, "ignore" this file. #3844
Copy link
Copy link
Closed
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: 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
While the pytestmark = pytest.mark.skip in the global scope is useful for skipping all tests in a file, it would be useful to be able to "ignore" the file altogether using a similar global assignment. That is, be able to provide a marker in the test file that will hide the module from discovery in the same manner as --ignore=<test-file> does on the command line.
My motivation here is as follows. pytest.mark.skip emits SKIPPED messages for each test in the file when the -v flag. Whereas, it would also be useful to suppress that output altogether by simply "ignoring" the file.
My enhancement proposal is provide "ignore" behaviour around the follow global syntax (or similar):
pytestmark = pytest.mark.ignore
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: 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