Esempio n. 1
0
def test_debug_does_not_log_until_debug_logging_is_enabled(capsys: CaptureFixture) -> None:
    logger = Logger()
    logger.debug("Message 1")
    logger.debug_logging_enabled = True
    logger.debug("Message 2")

    assert_stdout_stderr(capsys, "Message 2\n", "")
Esempio n. 2
0
def test_debug_logs_message(capsys: CaptureFixture) -> None:
    logger = Logger()
    logger.debug_logging_enabled = True
    logger.debug("Message")

    assert_stdout_stderr(capsys, "Message\n", "")