testdat 0.4.1
- Updated the failure message on
expect_all()to include more specific information on the location of erring values. In particular, variables failing the test are now highlighted in the error message. If, for instance, only one of three variables passed in as thevarsargument fails the test, then only that variable will be mentioned as failing the test in the failure message. This makes it easier to track down the cause of expectation failures when checking multiple variables at once. For example,
expect_all(everything(), is.numeric, data = iris):
#> Error: `iris` has 150 records failing `is.numeric` on variable `Species`.
#> Vars: everything()
#> Filter: None
#> Arguments: `` expect_all() sits behind many other expectations, which will also see a change to their failure message.
-
Soft deprecated
expect_allany(). This function was implemented purely as a back-end forexpect_all()andexpect_any(). The change toexpect_all()mentioned above differentiates it fromexpect_any()so that the two functions can no longer share a common back-end. Henceexpect_allany()is now redundant. -
Added
expect_depends()which allows you to test for functional dependency among variables. See the wikipedia page for more information about functional dependencies. -
Fixed a bug that was causing a corrupted excel file to be produced by
output_results_excel()if the test suite encountered an error (#56).