[TIP] Why do you use "autouse" fixtures?

Brian Okken variedthoughts at gmail.com
Tue Jul 26 12:14:30 PDT 2016

If you use "autouse" fixtures, I'd like to know why.

Here are a few examples I can think of:

* Work that needs done before, between, or after each test run that doesn't
affect the outcome of the test.
    * Maybe we have long running suites and we want to update some
reporting system whenever a test finishes.
* The system under test has error logs that need to be interrogated.
    * The tests maybe should check these logs and fail if new errors are
created. But just in case the test writer forgets, we can check error logs
and assert if there's something there. This will cause the test to Error.
Not as strong as a Fail, but better than missing the problem.

Are there more reasons?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20160726/e487ee12/attachment.htm>

More information about the testing-in-python mailing list