-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only allow named extension array tests
- Loading branch information
1 parent
518b4f1
commit 88ce1f8
Showing
3 changed files
with
401 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pytest | ||
|
||
|
||
def pytest_collection_modifyitems(config, items): | ||
skip = pytest.mark.skip(reason='Not in "only_run_named_tests"') | ||
|
||
for item in items: | ||
# If the class containing this test has the attribute "only_run_named_tests" | ||
# then tests with names not in that collection are skipped. | ||
include_list = getattr(item.cls, "only_run_named_tests", None) | ||
if include_list and item.originalname not in include_list: | ||
item.add_marker(skip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.