pytest can't see logs from function being tested
This may be the cause. Just create pytest.ini
with settings.
[pytest]log_cli=truelog_level=NOTSET
Works fine:
pytest test_my.py# ...-------------------------------- live log call ---------------------------------fulfillment.py 37 WARNING I'm a warningPASSED [100%]=========================== 1 passed in 0.09 seconds ===========================
Also you can set log_format
, log_date_format
and other options.
Hope this helps.