<#16601 We neither merge nor error when PYTEST_ADD...
# github-notifications
q
#16601 We neither merge nor error when PYTEST_ADDOPTS is specified in user config. Issue created by jsirois A user found when they ran certain tests, this was logged:
Copy code
[WARN] Failed to generate JUnit XML data for test/python/...
Those tests have a BUILD of:
Copy code
python_tests(
    name="tests",
    dependencies=[
        "3rdparty/python:nautobot-plugin-reqs",
        "3rdparty/python:reqs#pytest-django",
        "src/python/nautobot_animal_sounds",
        "src/python/netops_nautobot",
        "src/python/pytest_nautobot",
    ],
    extra_env_vars=[
        "DJANGO_SETTINGS_MODULE=nautobot.core.tests.nautobot_config",
        "NAUTOBOT_CONFIG=./src/python/netops_nautobot/nautobot_config.py",
        "NAUTOBOT_REDIS_PASSWORD=decinablesprewad",
        "PYTEST_ADDOPTS=-p pytest_nautobot --reuse-db",
    ],
    sources=["**/test_*.py"],
)
And we do not guard against
PYTEST_ADDOPTS
being set by the user; so our communication channel with pytest is stomped: pants/src/python/pants/backend/python/goals/pytest_runner.py Lines 315 to 322 in </pantsbuild/pants/commit/a69b8f0ef4e14451dbf7f39fd23adaf3f2700535|a69b8f0> pantsbuild/pants