ropensci / neotoma

Programmatic R interface to the Neotoma Paleoecological Database.
https://docs.ropensci.org/neotoma
Other
30 stars 16 forks source link

Test examples #150

Closed gavinsimpson closed 10 years ago

gavinsimpson commented 10 years ago

This PR implements a test which runs all the examples. This is useful as it runs the examples each time R CMD check is invoked, either manually or via Travis or Appveyor CI services.

This PR also removes the old inst/tests folder and contents, and renames the current test in tests/testthat such that they follow the test_foo.R naming convention.

karthik commented 10 years ago

Looks good to merge.

gavinsimpson commented 10 years ago

Thanks @karthik

Note that this will need to be activated only off-cran. I'm having difficulty with the new skip_on_cran() functionality in testthat which seems to be skipping the tests regardless of whether I have the NOT_CRAN=true environmental variable set locally or not. These tests are far too long for CRAN so this needs solving before we submit to CRAN.

gavinsimpson commented 10 years ago

The failure from AppvVeyor is in one of the examples (odd as I am not seeing this error locally on Linux).

Seems I need more informative error messages when tests fail. Will push something further to this branch/PR shortly.

gavinsimpson commented 10 years ago

I think we can merge this and I'll either work out why local tests don't run with skip_on_cran() and get them to run or I'll add in skip_on_cran() to the test anyway prior to release.