The caplog fixture doesn't appear to work consistently #8977
Labels
plugin: capture
related to the capture builtin plugin
plugin: logging
related to the logging builtin plugin
type: question
general question, might be closed after 2 weeks of inactivity
Taking the example test from the caplog documentation:
I've created a test module in the directory
tests/test_test_foo.py
.When I run
pytest tests
, it passes (along with the rest of my tests) but when I runpytest tests/test_test_foo.py
it appears that the caplog object doesn't capture anything:If anything I would have expected the opposite behavior. i.e. failing in presence of my other tests but passing on its own. Is this a bug? I don't know. I'm probably doing something wrong but I've exhausted the documentation and stackoverflow so I felt I should bring the question here.
The text was updated successfully, but these errors were encountered: