Contents:
caplog()
test_main()
test_simple()
test_with_mock()
test_zero_division()
logger()
Caplog fixture to be used with loguru.
logger – Logger.
caplog (LogCaptureFixture) – Provides access and control of log capturing.
caplog – The fixture to capture logging output.
Note
cf. https://bit.ly/3rwdyY2
Make sure that there is a main() in src/main.py.
Make sure the equation is always valid.
Test with Mock.
mocker (Mock) – src/main.py main().
Make sure the exceptions are raised.
Fixture for logger.
As test logger.
loguru.logger