pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/R-testthat
Module Name: pkgsrc
Committed By: mef
Date: Wed Jun 17 21:39:06 UTC 2026
Modified Files:
pkgsrc/devel/R-testthat: Makefile distinfo
Log Message:
(devel/R-testthat) Updated 3.2.3 to 3.3.2, Fix build against R-4.6.0
# testthat 3.3.2
----------------
* testthat now emits OpenTelemetry traces for tests when tracing is
enabled. Requires the otel and otelsdk packages (#2282).
* `default_parallel_reporter()` is no longer exported; use
`default_reporter(parallel = TRUE)` instead (#2305).
* `expect_snapshot()` once again reports the original error class for
base errors, rather than `rlang_error` (#2286).
* `expect_snapshot_file()` once again works with shinytest2 on CI
(#2293, #2288).
* `expect_snapshot_file()` correctly reports file name if duplicated
(@MichaelChirico, #2296).
* `expect_success()` and `expect_failure()` now always report the
observed number of successes and failures (#2297).
* `LlmReporter()` is a new reporter designed for use by LLM coding
agents. It's used automatically inside Claude Code, Cursor, and
Gemini CLI, and you can set `AGENT=1` to use with any coding agent
(#2287).
* `local_mocked_s3_method()` and `local_mocked_s4_method()` can now
mock methods that don't already exist, and can use `definition =
NULL` to temporarily remove a method. `local_mocked_s4_method()` now
also works when the generic is defined in another package (#2302).
* `local_snapshotter()` restores `snap_dir` to be the first argument
for compatibility with devtools 2.4.6 (#2309).
* `test_dir()` no longer runs tests in parallel if only a single file
is being tested (#2305).
# testthat 3.3.1
----------------
* `expect_snapshot()` and friends only emit the
`snapshot_download_gh()` hint when running in a job named
"R-CMD-check" (#2300).
# testthat 3.3.0
----------------
## Lifecycle changes
* testthat now requires R 4.1.
* `expect_snapshot(binary)`, soft deprecated in 3.0.3 (2021-06-16), is
now fully deprecated.
* `is_null()`/`matches()`, deprecated in 2.0.0 (2017-12-19), and
`is_true()`/`is_false()`, deprecated in 2.1.0 (2019-04-23), have
been removed (#2109).
* `local_mock()` and `with_mock()`, deprecated in 3.0.0 (2020-10-31),
are now defunct. They technique that made them work is no longer
permitted in R 4.5.0.
* `test_files(wrap)`, deprecated in 3.0.0 (2020-10-31) has now been
removed.
## Expectations and tests
* All `expect_` functions have had their failure messages
rewritten. They now all state what was expected, what was actually
received, and, if possible, clearly illustrate the difference
(#2142). They also consistently check that their inputs are the
correct type (#1754). They consistently return the value of the
first argument, regardless of whether the expectation succeeds or
fails (the only exception is `expect_message()` and friends which
return the condition). This shouldn't affect existing tests, but
will make failures clearer when you chain together multiple
expectations (#2246).
* It's now much easier to create custom expectations, thanks to an
overhauled `vignette("custom-expectations")` (#2113, #2132, #2072),
a new `pass()` function to use in place of `succeed()` (#2113), and
revisions to how `expectation()` works
(#2125). `expect_no_failures()` and `expect_no_successes()` are now
deprecated as now `expect_success()` also tests for the absence of
failures and `expect_failure()` tests for the absence of successes.
* Tests (i.e. `test_that()`, `describe()`, and `it()` calls) can now
be arbitrarily nested with a shared stack of descriptions so that
the failures can show the full path through all subtests. Skips in
subtests are now correctly scoped (#2007), and each subtest and will
skip if and only if it and its subtests don't contain any
expectations.
* On CRAN, `test_that()` will automatically skips if a package is not
installed (#1585). Practically, this means that you no longer need
to check that suggested packages are installed. (We already didn't
check the installation of suggested packages in the tidyverse
because we think it has limited payoff, but other styles advise
differently.)
* When running a test interactively, testthat now reports the number
of successes and failures. If you're using nested tests, the results
should be more useful and you will no longer see duplicated failures
(#2063, #2188).
* New `expect_all_equal()`, `expect_all_true()`, and
`expect_all_false()` check that every element of a vector has the
same value (#1836, #2235), giving better error messages than
`expect_true(all(...))`.
* New `expect_disjoint()` expects values to to be absent (@stibu81,
#1851).
* New `expect_r6_class()` expects an R6 objects (#2030).
* New `expect_shape()` expects a specific shape (i.e., `nrow()`,
`ncol()`, or `dim()`) (#1423, @michaelchirico).
## Other new features
* New `extract_test()` function to extract a reprex from a failing
expectation. tests run in `R CMD check` will use this to
automatically create a reprex in the `_problems/` directory for each
failing expectation. You can turn this behaviour off by setting
`TESTTHAT_PROBLEMS=false` (#2263).
* New `local_mocked_s3_method()`, `local_mocked_s4_method()`, and
`local_mocked_r6_class()` allow you to mock S3 and S4 methods and R6
classes (#1892, #1916)
* New `local_on_cran(TRUE)` allows you to simulate how your tests will
run on CRAN (#2112).
* `test_dir()`, `test_file()`, `test_package()`, `test_check()`,
`test_local()`, `source_file()` gain a `shuffle` argument that uses
`sample()` to randomly reorder the top-level expressions in each
test file (#1942). This random reordering surfaces dependencies
between tests and code outside of any test, as well as dependencies
between tests. This helps you find and eliminate unintentional
dependencies.
* `try_again()` is now publicised, making it easier to test flaky
code. We changed the first argument to represent the number of
retries, not tries (#2050).
* New `skip_unless_r()` skip tests on unsuitable versions of R. It has
a convenient sytnax so you can use, e.g., `skip_unless_r(">=
4.1.0")` to skip tests that require `...names()` (@MichaelChirico,
#2022).
* New `snapshot_reject()` rejects all modified snapshots by deleting
the `.new` variants (#1923), and `snapshot_download_gh()` makes it
easy to get snapshots off GitHub and into your local package
(#1779).
* `expect_snapshot()` and friends will now fail when creating a new
snapshot on CI. This is usually a signal that you've forgotten to
run it locally before committing (#1461).
* New `SlowReporter` makes it easier to find the slowest tests in your
package. You can run it with `devtools::test(reporter = "slow")`
(#1466).
* New `vignette("mocking")` explains mocking in detail (#1265).
* New `vignette("challenging-functions")` provides an index to other
documentation organised by various challenges (#1265).
## Minor improvements and bug fixes
* Interrupting a test now prints the test name. This makes it easier
to tell where a very slow test might be hanging (#1464).
* Fixed an issue preventing compilation from succeeding due to
deprecation / removal of `std::uncaught_exception()` (@kevinushey,
#2047).
* `expect_lt()`, `expect_gt()`, and friends have a refined display
that is more likely to display the correct number of digits and
shows you the actual values compared (#2006). They have a better
display for non-numeric data (@stibu81, #2268).
* `expect_matches()` failures should be a little easier to read
(#2135, #2181).
* `expect_no_*()` now executes the entire code block, rather than
stopping at the first message or warning (#1991).
* `expect_named()` now gives more informative errors (#2091).
* `expect_s4_class()` now supports unquoting (@stibu81, #2064).
* `expect_snapshot()` no longer loses the last snapshot if file is
missing the final newline (#2092). It's easy to accidentally remove
this because there are two trailing new lines in snapshot files and
many editors will automatically remove one if you touch the file.
* `expect_snapshot()` on reports how to resolve failures once when
running inside `R CMD check`.
* `expect_snapshot()` no longer skips on CRAN, as that skips the rest
of the test. Instead it just returns, neither succeeding nor failing
(#1585).
* `expect_snapshot()` and `expect_snapshot_file()` hints now include
the path to the package, if it's not the current working directory
(#1577).
* `expect_snapshot()` gives a more informative backtrace when the code
inside the snapshot errors (#2277).
* `expect_snapshot_file()` now clearly errors if the `path` doesn't
exist (#2191), or has been used alreaday (#1592). It now considers
`.json` to be a text file (#1593), and shows differences for text
files in the console (#1593).
* `expect_snapshot_value()` can now handle expressions that generate
`-` (#1678) or zero length atomic vectors (#2042).
* `expect_vector()` fails, instead of erroring, if `object` is not a
vector (@plietar, #2224).
* `JunitReporter()` no longer fails with `"no applicable method for
xml_add_child "` for warnings outside of tests (#1913). Additionally,
warnings now save their backtraces and `JunitReporter()` strips ANSI
escapes in more places (#1852, #2032).
* `local_edition()` now gives a useful error for bad values (#1547).
* `ParallelProgressReporter` now respects `max_failures` (#1162), and
test files with syntax errors are no longer silently ignored
(#1360).
* `test_file(desc = ...)` (i.e. test filtering) no longer loses
snapshot results (#2066), works with `it()`, and can now be
character vector in order to recursively filter subtests (#2118).
* `test_that()` no longer warns about the absence of `{}` since it no
longer seems to be necessary.
* `set_state_inspector()` gains `tolerance` argument and ignores minor
FP differences by default (@mcol, #2237).
* `skip_on_os()` gains an option `"emscripten"` of the `os` argument
to skip tests on Emscripten (@eitsupi, #2103).
* `snapshot_accept(test)` now works when the test file name contains
`.` (#1669).
* `snapshot_review()` includes a reject button and only displays the
file navigation and the skip button if there are multiple files to
review (#2025). It now passes `...` on to `shiny::runApp()` (#1928).
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/devel/R-testthat/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/R-testthat/distinfo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/R-testthat/Makefile
diff -u pkgsrc/devel/R-testthat/Makefile:1.25 pkgsrc/devel/R-testthat/Makefile:1.26
--- pkgsrc/devel/R-testthat/Makefile:1.25 Wed Jan 29 12:01:06 2025
+++ pkgsrc/devel/R-testthat/Makefile Wed Jun 17 21:39:06 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2025/01/29 12:01:06 mef Exp $
+# $NetBSD: Makefile,v 1.26 2026/06/17 21:39:06 mef Exp $
R_PKGNAME= testthat
-R_PKGVER= 3.2.3
+R_PKGVER= 3.3.2
CATEGORIES= devel
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
Index: pkgsrc/devel/R-testthat/distinfo
diff -u pkgsrc/devel/R-testthat/distinfo:1.20 pkgsrc/devel/R-testthat/distinfo:1.21
--- pkgsrc/devel/R-testthat/distinfo:1.20 Wed Jan 29 12:01:06 2025
+++ pkgsrc/devel/R-testthat/distinfo Wed Jun 17 21:39:06 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.20 2025/01/29 12:01:06 mef Exp $
+$NetBSD: distinfo,v 1.21 2026/06/17 21:39:06 mef Exp $
-BLAKE2s (R/testthat_3.2.3.tar.gz) = 5b4cbeeefa92afdcd235cecd7be74cea19cc8454f50d40c5a120eac85e86dd2f
-SHA512 (R/testthat_3.2.3.tar.gz) = 5fa5394fc5102c6381d69a13c638b2db2f0b63dabd5d65f4b463a3dd457b997cee5d7b49c859fcd1ba6a1503529e1bdbb64170a516cd03ee4c5b4de73118d1fd
-Size (R/testthat_3.2.3.tar.gz) = 738940 bytes
+BLAKE2s (R/testthat_3.3.2.tar.gz) = 84362bbbb9a9d81c535c5bdcdec7a3c43e0ec4da7109cfdb7679da834bdb6c17
+SHA512 (R/testthat_3.3.2.tar.gz) = b546297e5457c2d104b2c8efbbead23c66a0e0dcd6f3ef7527a6e4d8109b470d7f2e0d92bcaa30373dceb1f973ca86b65ac146e69ed345eeb5b7ff4833c45b36
+Size (R/testthat_3.3.2.tar.gz) = 834043 bytes
Home |
Main Index |
Thread Index |
Old Index