def test_invalid_options_show_extra_information(pytester: Pytester) -> None:
    """Display extra information when pytest exits due to unrecognized
    options in the command-line."""
    pytester.makeini(
        """
        [pytest]
        addopts = --invalid-option
    """
    )
    result = pytester.runpytest()
    result.stderr.fnmatch_lines(
        [
            "*error: unrecognized arguments: --invalid-option*",
            "*  inifile: {}*".format(pytester.path.joinpath("tox.ini")),
            f"*  rootdir: {pytester.path}*",
        ]
    )
Display extra information when pytest exits due to unrecognized
    options in the command-line.
testing/test_config.py