-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation/errors: provide a forward-path for the --junitxml deprecation #6265
Comments
Ah… I've finally figure out that the warning is because I don't have this value set at all! I guess explicitly saying so in the error message would help? |
Looks like the warning is defined here: pytest/src/_pytest/deprecated.py Lines 38 to 41 in d1eb89d
and used here: pytest/src/_pytest/junitxml.py Lines 434 to 437 in d1eb89d
I think it would be sufficient to expand the message: JUNIT_XML_DEFAULT_FAMILY = PytestDeprecationWarning(
"You have not set the 'junit_family' config value, which currently defaults to 'xunit1'.\n"
"The 'junit_family' default value will change to 'xunit2' in pytest 6.0.\n"
"Add 'junit_family=legacy' (or another value) to your pytest.ini file to "
"silence this warning and make your suite compatible."
) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @Zac-HD ,
I'm not sure I follow the meaning of the message. What does "legacy (or another value)" mean? Shouldn't the recommendation be to explicitly set the current default? Ie. the last sentence whould read : « Add 'junit_family=xunit1' to your pytest.ini file to keep the current format in future versions of pytest and silence this warning ». |
@fperrin I agree 👍 |
Also agree, I'd just made the minimal edit without thinking too much 😅 |
Thanks everyone: #6343 👍 |
Thanks @nicoddemus |
With the deprecation of junitxml, we are only provided with a way to silence the warning, but no clear path to act on it in a way that isn't just kicking the can down the road. The deprecation warning should include a future-ready solution as well even if that's just a link to the external plugin or whatever.
The text was updated successfully, but these errors were encountered: