Created
December 3, 2015 10:09
-
-
Save BeyondEvil/c37047520949789d378d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def pytest_runtest_setup(item): | |
""" | |
py.test hook for test configuration | |
:param item: py.test item module | |
:return: None | |
""" | |
from tools import TagsCollection | |
print "IN RUNTEST" | |
print item | |
config = item.config | |
# Get all tags for this test (includes tags on class level if present) | |
tags = item.get_marker("tags") | |
# Create a list of the tags | |
tags_list = TagsCollection.build_tags_list(tags.args) | |
# Determine if test shoul be run depending on the parameter tags | |
# See also: pytest_configure hook | |
if not config.parameter_tags.should_pick_up(tags_list): | |
pytest.skip("Skipping test!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment