-
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
Warn when snapshots are discarded #1278
Conversation
NEWS.md
Outdated
@@ -1,12 +1,16 @@ | |||
# testthat (development version) | |||
|
|||
* A warning is given when snapshots are discarded due to reusing the same | |||
test name (#1278, @krlmlr). | |||
|
|||
* New `testthat.progress.verbose_skips` option. Set to `FALSE` to stop | |||
reporting skips as they occur, they will still appear in the summary | |||
(#1209, @krlmlr). | |||
|
|||
* `CheckReporter` now always shows the full test name (#1268). | |||
|
|||
* Catch tests are no longer reported multiple times (#1237). |
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.
Do you mind deleting this bullet since it's repeated below and problem comes from a merge?
R/snapshot-reporter.R
Outdated
@@ -87,7 +90,7 @@ SnapshotReporter <- R6::R6Class("SnapshotReporter", | |||
self$cur_snaps[[self$test]] <- self$old_snaps[[self$test]] | |||
|
|||
if (self$i > 0) { | |||
testthat_warn("Snapshots reset after error/skip") | |||
testthat_warn(paste0("Snapshots reset after error/skip: ", 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.
Won't the test name have been printed above?
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.
Probably, let's try and see.
c06b0cd
to
ceb2a4f
Compare
Do we need to always warn with duplicate tests ( |
Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
Thanks! |
Do we need to always warn with duplicate tests (
is.null()
vs.length() == 0
)?