Esempio n. 1
0
def test_that_logger_with_high_verbosity_level_does_emit_warning_logs(
        logger: Logger, level: Verbosity):
    logger.set_verbosity(level)
    logger.warning("test")

    output = get_logger_output(logger)
    assert "WARNING" in output
Esempio n. 2
0
def test_that_logger_with_high_verbosity_level_does_emit_info_logs(
        logger: Logger, level: Verbosity):
    logger.set_verbosity(level)
    logger.info("test")

    output = get_logger_output(logger)
    assert "INFO" in output
Esempio n. 3
0
def test_that_logger_with_high_verbosity_level_does_emit_debug_logs(
        logger: Logger, level: Verbosity):
    logger.set_verbosity(level)
    logger.debug("test")

    output = get_logger_output(logger)
    assert "DEBUG" in output
Esempio n. 4
0
def test_that_logger_with_low_verbosity_level_does_not_emit_info_logs(
        logger: Logger, level):
    logger.set_verbosity(level)
    logger.info("test")

    output = get_logger_output(logger)
    assert "INFO" not in output
Esempio n. 5
0
def test_that_logger_always_emits_errors(logger: Logger, level: Verbosity):
    logger.set_verbosity(level)
    logger.error("test")

    output = get_logger_output(logger)
    assert "ERROR" in output