def test_log_cli_default_level_multiple_tests(
    pytester: Pytester, request: FixtureRequest
) -> None:
    """Ensure we reset the first newline added by the live logger between tests"""
    filename = request.node.name + ".py"
    pytester.makepyfile(
        """
        import logging

        def test_log_1():
            logging.warning("log message from test_log_1")

        def test_log_2():
            logging.warning("log message from test_log_2")
    """
    )
    pytester.makeini(
        """
        [pytest]
        log_cli=true
    """
    )

    result = pytester.runpytest()
    result.stdout.fnmatch_lines(
        [
            f"{filename}::test_log_1 ",
            "*WARNING*log message from test_log_1*",
            "PASSED *50%*",
            f"{filename}::test_log_2 ",
            "*WARNING*log message from test_log_2*",
            "PASSED *100%*",
            "=* 2 passed in *=",
        ]
    )
Ensure we reset the first newline added by the live logger between tests
testing/logging/test_reporting.py