def pytest_configure()

in pytest_azurepipelines.py [0:0]


def pytest_configure(config):
    xmlpath = config.getoption("--nunitxml")
    if not xmlpath:
        config.option.nunit_xmlpath = DEFAULT_PATH

    # ensure coverage creates xml format
    if config.pluginmanager.has_plugin("pytest_cov"):
        if config.option.cov_report.get("xml") is None:
            config.option.cov_report["xml"] = os.path.normpath(
                os.path.abspath(os.path.expanduser(os.path.expandvars(DEFAULT_COVERAGE_PATH)))
            )
        if "html" not in config.option.cov_report:
            config.option.cov_report["html"] = None