Skip to content

testdat 0.4.1

Choose a tag to compare

@gorcha gorcha released this 25 Aug 02:48
  • 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 the vars argument 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 for expect_all() and expect_any(). The change to expect_all() mentioned above differentiates it from expect_any() so that the two functions can no longer share a common back-end. Hence expect_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).