Skip to content
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

New option testthat.summary.omit_dots to omit progress dots #502

Merged
merged 9 commits into from
Dec 19, 2016

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Jul 7, 2016

The dots account for roughly 10%-20% of the testing time, this is difficult to parallelize (#486). Default: Show dots.

Now also fixes #520.

@krlmlr
Copy link
Member Author

krlmlr commented Jul 7, 2016

Testing in RStudio seems to ignore .Rprofile, I don't know how to set this option globally so that it is also respected when testing in RStudio.

@@ -41,22 +43,23 @@ SummaryReporter <- R6::R6Class("SummaryReporter", inherit = Reporter,
},

add_result = function(context, test, result) {
dot <- NULL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't particularly like the flow of logic here, but I can't see an obviously better approach.

@@ -65,7 +65,7 @@ test_that("reporters produce consistent output", {
save_report("debug")
)
save_report("check", error_regexp = NULL)
save_report("summary", SummaryReporter$new(show_praise = FALSE))
save_report("summary", SummaryReporter$new(show_praise = FALSE, omit_dots = FALSE))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need a test with omit_dots = TRUE

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added as "summary-no-dots".

@hadley
Copy link
Member

hadley commented Dec 15, 2016

And a bullet for news please (I'll handle any merge conflicts)

@krlmlr
Copy link
Member Author

krlmlr commented Dec 18, 2016

@hadley: Rebased, added NEWS. Still needs a description in the help, waiting for #559.

option `testthat.summary.max_reports` (default 15) is reached
(#520).

* New option `testthat.summary.omit_dots`, default to `FALSE`. Setting to `TRUE` hides the progress dots from the output of the summary reporter, which speeds up tests by a small margin (#502).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs line break

@krlmlr
Copy link
Member Author

krlmlr commented Dec 19, 2016

Added help description, should be complete now.

@hadley hadley merged commit 7478629 into master Dec 19, 2016
@hadley
Copy link
Member

hadley commented Dec 19, 2016

Thanks!

@krlmlr krlmlr deleted the f-dot-performance branch December 19, 2016 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to stop tests earlier if more than n fail
2 participants