-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hook which is called before every test
- Loading branch information
1 parent
7c014d0
commit 04f0972
Showing
5 changed files
with
41 additions
and
4 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .hooks import pytest_collect_file, pytest_addoption | ||
from .hooks import pytest_collect_file, pytest_addoption, pytest_addhooks | ||
from .util import add_parser_options | ||
|
||
__all__ = ["pytest_addoption", "pytest_collect_file", "add_parser_options"] | ||
__all__ = ["pytest_addoption", "pytest_collect_file", "pytest_addhooks", "add_parser_options"] |
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
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
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,19 @@ | ||
# pylint: disable=unused-argument | ||
|
||
|
||
def pytest_tavern_before_every_test_run(test_dict, variables): | ||
"""Called: | ||
- directly after fixtures are loaded for a test | ||
- directly before verifying the schema of the file | ||
- Before formatting is done on values | ||
- After fixtures have been resolved | ||
- After global configuration has been loaded | ||
- After plugins have been loaded | ||
Modify the test in-place if you want to do something to it. | ||
Args: | ||
test_dict (dict): Test to run | ||
variables (dict): Available variables | ||
""" |
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