| 424 | |
| 425 | |
| 426 | def pytest_configure(config: Config) -> None: |
| 427 | xmlpath = config.option.xmlpath |
| 428 | # Prevent opening xmllog on worker nodes (xdist). |
| 429 | if xmlpath and not hasattr(config, "workerinput"): |
| 430 | junit_family = config.getini("junit_family") |
| 431 | config.stash[xml_key] = LogXML( |
| 432 | xmlpath, |
| 433 | config.option.junitprefix, |
| 434 | config.getini("junit_suite_name"), |
| 435 | config.getini("junit_logging"), |
| 436 | config.getini("junit_duration_report"), |
| 437 | junit_family, |
| 438 | config.getini("junit_log_passing_tests"), |
| 439 | ) |
| 440 | config.pluginmanager.register(config.stash[xml_key]) |
| 441 | |
| 442 | |
| 443 | def pytest_unconfigure(config: Config) -> None: |