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