-
Notifications
You must be signed in to change notification settings - Fork 318
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
Add options scope to junitreporter #1885
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
NEWS.md
Outdated
@@ -54,6 +54,9 @@ | |||
|
|||
* `test_file()` gains a `desc` argument which allows you to run a single | |||
test from a file (#1776). | |||
|
|||
* `JunitReporter()` now uses ensures numeric values are saved the xml file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please put this under the development version heading?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, my bad, didn't spot that there are 2 versions back to back. Want me to copy the same subsection structure (## Lifecycle changes, ## New features etc.) or just put it under the development version and that's it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just copy the bullet. We add the subsections as part of the release process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, done :)
R/reporter-junit.R
Outdated
xml2::xml_attr(self$suite, "tests") <- as.character(self$tests) | ||
xml2::xml_attr(self$suite, "skipped") <- as.character(self$skipped) | ||
xml2::xml_attr(self$suite, "failures") <- as.character(self$failures) | ||
xml2::xml_attr(self$suite, "errors") <- as.character(self$errors) | ||
#jenkins junit plugin requires time has at most 3 digits | ||
xml2::xml_attr(self$suite, "time") <- as.character(round(self$suite_time, 3)) | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please get rid of these spurious whitespace changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Thanks
R/reporter-junit.R
Outdated
# Make sure that any options posed by particular tests environments | ||
# will not interfere with how values are saved to the file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Make sure that any options posed by particular tests environments | |
# will not interfere with how values are saved to the file | |
# Always uses . as decimal place in output regardless of options set in test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Thanks
Thanks! |
Resolves #1660
According to @hadley's suggestions, I just enforced the decimal operator as an option scoped to the entire function. With that change, JUnit file should always be valid regardless of the decimal separator option used in the test.