示例#1
0
def test_debug_does_not_log_until_debug_logging_is_enabled(
        capsys: CaptureFixture) -> None:
    logger = Logger()
    logger.debug("Message 1")
    logger.enable_debug_logging()
    logger.debug("Message 2")

    assert_stdout_stderr(capsys, "Message 2\n", "")
示例#2
0
def test_debug_logs_message(capsys: CaptureFixture) -> None:
    logger = Logger()
    logger.enable_debug_logging()
    logger.debug("Message")

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