def test_date_format_percentf_log(pytester: Pytester) -> None:
    """Make sure that microseconds are printed in log."""
    pytester.makepyfile(
        """
        import logging

        logger = logging.getLogger(__name__)

        def test_foo():
            logger.warning('text')
            assert False
        """
    )
    pytester.makeini(
        """
        [pytest]
        log_format=%(asctime)s; %(levelname)s; %(message)s
        log_date_format=%Y-%m-%d %H:%M:%S.%f
    """
    )
    result = pytester.runpytest()
    assert result.ret == 1
    result.stdout.re_match_lines([r"^[0-9-]{10} [0-9:]{8}.[0-9]{6}; WARNING; text"])
Make sure that microseconds are printed in log.
testing/logging/test_reporting.py