Skip to content

Commit 620035a

Browse files
committed
Inherit tolerance docs
1 parent ba4ec9e commit 620035a

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

β€ŽDESCRIPTIONβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ Config/testthat/parallel: true
5757
Config/testthat/start-first: watcher, parallel*
5858
Encoding: UTF-8
5959
Roxygen: list(markdown = TRUE, r6 = FALSE)
60-
RoxygenNote: 7.3.2
60+
RoxygenNote: 7.3.3

β€ŽNEWS.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# testthat (development version)
22

3-
* `set_state_inspector()` now allows to control the tolerance (#2237).
3+
* `set_state_inspector()` gains `tolerance` argument and ignores minor FP differences by default (@mcol, #2237).
44
* New `vignette("mocking")` explains mocking in detail (#1265).
55
* New `vignette("challenging-functions")` provides an index to other documentation organised by testing challenges (#1265).
66
* When running a test interactively, testthat now reports the number of succeses. The results should also be more useful if you are using nested tests.

β€ŽR/test-state.Rβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@
4242
#' @export
4343
#' @param callback Either a zero-argument function that returns an object
4444
#' capturing global state that you're interested in, or `NULL`.
45-
#' @param tolerance Numerical tolerance: any differences (in the sense of
46-
#' [base::all.equal()]) smaller than this value will be ignored.
45+
#' @inheritParams waldo::compare
4746
set_state_inspector <- function(callback, tolerance = testthat_tolerance()) {
4847
if (
4948
!is.null(callback) &&

β€Žman/expect_vector.Rdβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/set_state_inspector.Rdβ€Ž

Lines changed: 12 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)