def test_without_date_format_log(pytester: Pytester) -> None:
    """Check that date is not printed by default."""
    pytester.makepyfile(
        """
        import logging

        logger = logging.getLogger(__name__)

        def test_foo():
            logger.warning('text')
            assert False
        """
    )
    result = pytester.runpytest()
    assert result.ret == 1
    result.stdout.fnmatch_lines(
        ["WARNING  test_without_date_format_log:test_without_date_format_log.py:6 text"]
    )
Check that date is not printed by default.
testing/logging/test_reporting.py