Closed beanumber closed 10 months ago
I'm stumped.
devtools::test()
works just fine. But it fails during
devtools::check()
Status: 1 ERROR checking tests ... ERROR Running ‘testthat.R’ Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output: 32: readr::parse_number(world_cities$Population..4) 33: parse_vector(x, col_number(), na = na, locale = locale) 34: warn_problems(parse_vector_(x, collector, na = na, locale_ = locale)) 35: n_problems(x) 36: probs(x) 37: suppressWarnings(x) 38: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning")) 39: parse_vector_(x, collector, na = na, locale_ = locale) testthat results ================================================================ OK: 29 SKIPPED: 0 FAILED: 1 1. Error: cities works (@test-etl.R#113) Error: testthat unit tests failed Execution halted
The offending line of code is
world_cities$city_pop <- readr::parse_number(world_cities$`Population..4`)
I have also tried
world_cities <- mutate_(city_pop = ~readr::parse_number(`Population..4`))
Any ideas?
This did not solve the problem (https://github.com/hadley/testthat/issues/144)
It also passes the check on Travis with the release version of R, but fails on win-builder.
(https://stackoverflow.com/questions/46334054/devtoolstest-works-but-devtoolscheck-doesnt-why)
I'm stumped.
works just fine. But it fails during
The offending line of code is
I have also tried
Any ideas?