-
-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Description
This example in the documentation is awesome:
def time_request(stage):
t0 = time.time()
yield
t1 = time.time()
logger.info("Request for stage %s took %s", stage, t1 - t0)# test_stuff.tavern.yaml
tinctures:
- function: package.helpers:time_requestBut I want to apply this to all tests and get all requests performance measured, so instead of adding these two lines of code to every single test, I'd like to use the including external files feature. I created an yaml file like this:
# include_tinctures.yaml
tinctures:
- function: package.helpers:time_requestThen added this to pytest.ini:
[pytest]
tavern-global-cfg =
include_tinctures.yamlThis should work like if we had this in every test, right?
includes:
- !include include_tinctures.yamlBut I'm unable to make it work. Am I missing anything? Being able to do so would be awesome, tavern would become a performance tester too.
Thank you for the awesome tool by the way!!
Metadata
Metadata
Assignees
Labels
No labels