Replies: 1 comment 1 reply
-
Unfortunately its not safety possible at the moment A approximation woul be a pair of fixtures where the function scoped facade reports each test to the module scoped one |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Today, we advise our library users to set up a fixture that looks like this:
Which is fine, except it's imprecise.
The logs are dumped when any test in the session, not current module has failed.
(I'm also unclear about tests that errored out, e.g. some other fixture raised, rather than failed).
Ideally, the module-scoped fixture could get something like
request
ormodule_request
argument that allows it to interrogate the tests for which this very instance of the fixture was set up.Is there a way to do this?
Would this be a good feature for pytest itself?
Beta Was this translation helpful? Give feedback.
All reactions