tests package

Submodules

tests.conftest module

tests.conftest.caplog(logger, caplog: LogCaptureFixture)[source]

Caplog fixture to be used with loguru.

Parameters:
  • logger – Logger.

  • caplog (LogCaptureFixture) – Provides access and control of log capturing.

Yields:

caplog – The fixture to capture logging output.

tests.test_main module

tests.test_main.test_main()[source]

Make sure that there is a main() in src/main.py.

tests.test_main.test_simple()[source]

Make sure the equation is always valid.

tests.test_main.test_with_mock(mocker)[source]

Test with Mock.

Parameters:

mocker (Mock) – src/main.py main().

tests.test_main.test_zero_division()[source]

Make sure the exceptions are raised.

Module contents

tests.logger()[source]

Fixture for logger.

Returns:

As test logger.

Return type:

loguru.logger