You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change junit_family default to xunit2 in pytest 6 #6178
Running tests with pytest now shows the warning you mention. But it's unclear what the impact of this change is, hence what should I as a developer actually do?
Is it required to add the junit_family=xunit1 line to my pytest configuration?
Will my CI build be affected or something (aka, can I ignore this warning if I don't use Jenkins)?
.tox/py37/lib/python3.7/site-packages/_pytest/junitxml.py:417
<redacted>/_pytest/junitxml.py:417: PytestDeprecationWarning: The 'junit_family' default value will change to 'xunit2' in pytest 6.0.
Add 'junit_family=xunit1' to your pytest.ini file to keep the current format in future versions of pytest and silence this warning.
_issue_warning_captured(deprecated.JUNIT_XML_DEFAULT_FAMILY, config.hook, 2)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
The link provided doesn't seem to have information related to the impact of the change, but rather on how warnings are handled and can be controled.
➜ Where can I find information about the impact that this change will have?
I did read (and understand) that, but why should my test suite break for a jUnit output format? Note that I guess it's all about the --junitxml option. My tests won't break, will they?
So, if they won't, what will break? What are you warning about? Should I (and others) care? What would the "upgrade path" look like?
Activity
Zac-HD commentedon Nov 26, 2019
Per #6265 (comment) we already have such a warning - that issue is just to expand and clarify the message.
Zac-HD commentedon Nov 27, 2019
@blueyed - I think it's worth keeping this open so we remember to change it in pytest 6?
blueyed commentedon Nov 27, 2019
@Zac-HD
GitHub failed me when I only wanted to close my issues, sorry.
Zac-HD commentedon Nov 27, 2019
No worries, easily fixed 😄
[-]Change junit_family default to xunit2[/-][+]Change junit_family default to xunit2 in pytest 6[/+]bittner commentedon Apr 26, 2020
Running tests with pytest now shows the warning you mention. But it's unclear what the impact of this change is, hence what should I as a developer actually do?
junit_family=xunit1line to my pytest configuration?The link provided doesn't seem to have information related to the impact of the change, but rather on how warnings are handled and can be controled.
➜ Where can I find information about the impact that this change will have?
nicoddemus commentedon Apr 28, 2020
Hi @bittner,
Actually the important bit is here (emphasis mine):
So yes the answer is to add that line to your pytest.ini to avoid having your suite breaking when upgrading to pytest 6. 👍
bittner commentedon Apr 28, 2020
I did read (and understand) that, but why should my test suite break for a jUnit output format? Note that I guess it's all about the
--junitxmloption. My tests won't break, will they?So, if they won't, what will break? What are you warning about? Should I (and others) care? What would the "upgrade path" look like?
32 remaining items
setuptools: Autospec creation for update from version 58.3.0 to versi…
jaraco.functools: Autospec creation for update from version 3.3.0 to …
backports.entry_points_selectable: Autospec creation for update from …
importlib_metadata: Autospec creation for update from version 4.8.1 t…
keyring: Autospec creation for update from version 23.2.1 to version …
zipp: Autospec creation for update from version 3.6.0 to version 3.7.0
jaraco.collections: Autospec creation for update from version 3.4.0 t…
pypi-tempora: Autospec creation for update from version 4.1.2 to vers…
pypi-pytest_runner: Autospec creation for update from version 5.3.1 t…
Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
pypi-jaraco.classes: Autospec creation for update from version 3.2.1 …
Add workaround for warning emitted when junitxml is used. Ref pytest-…
Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.