Closed aappling-usgs closed 8 years ago
better! appveyor passed, but travis has a timezone issue
Last 13 lines of output:
2. Failure: ts file paths can be made and parsed (@test-mda_helpers.R#78) ------
parse_ts_path("ARCHIVE_20140713000000-nwis_12398074-ts_doobs_nwis.rds")$creation_date not equal to as.POSIXct("2014-07-13", tz = "UTC").
Attributes: < Component "tzone": 1 string mismatch >
testthat results ================================================================
OK: 119 SKIPPED: 0 FAILED: 2
1. Error: combine_ts works (@test-combine_ts.R#59)
2. Failure: ts file paths can be made and parsed (@test-mda_helpers.R#78)
travis issues:
Using bundled GitHub PAT. Please add your own PAT to the env var `GITHUB_PAT`
1. Error: combine_ts works (@test-combine_ts.R#59) -----------------------------
unable to find an inherited method for function 'unitted' for signature '"difftime"'
1: expect_equal(mba$suntime[mba$DateTime == "2015-03-09 23:00:00 UTC"], base$suntime[base$DateTime ==
"2015-03-09 23:00:00 UTC"]) at testthat/test-combine_ts.R:59
2: compare(object, expected, ...)
3: compare.POSIXt(object, expected, ...)
4: vector_equal_tol(x, y, tolerance = tolerance)
5: x - y
6: x - y
7: unitted_Ops(.Generic, e1, e2)
8: unitted_Ops(.Generic, e1, e2)
9: unitted(do.call(.Generic, list(deunitted(e1), deunitted(e2))), do.call(.Generic,
list(get_unitbundles(e1), get_unitbundles(e2))))
10: (function (classes, fdef, mtable)
{
methods <- .findInheritedMethods(classes, fdef, mtable)
if (length(methods) == 1L)
return(methods[[1L]])
else if (length(methods) == 0L) {
cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
stop(gettextf("unable to find an inherited method for function %s for signature %s",
sQuote(fdef@generic), sQuote(cnames)), domain = NA)
}
else stop("Internal error in finding inherited methods; didn't return a unique method",
domain = NA)
})(list("difftime"), structure(function (object, units = NA, ...)
{
standardGeneric("unitted")
}, generic = structure("unitted", package = "unitted"), package = "unitted", group = list(), valueClass = character(0), signature = c("object",
"units"), default = `\001NULL\001`, skeleton = (function (object, units = NA, ...)
stop("invalid call in method dispatch to 'unitted' (no default method)", domain = NA))(object,
units, ...), class = structure("nonstandardGenericFunction", package = "methods")),
<environment>)
11: stop(gettextf("unable to find an inherited method for function %s for signature %s",
sQuote(fdef@generic), sQuote(cnames)), domain = NA)
2. Failure: ts file paths can be made and parsed (@test-mda_helpers.R#78) ------
parse_ts_path("ARCHIVE_20140713000000-nwis_12398074-ts_doobs_nwis.rds")$creation_date not equal to as.POSIXct("2014-07-13", tz = "UTC").
Attributes: < Component "tzone": 1 string mismatch >
i wonder if the failure at test-combine_ts.R#59 is because the datetimes are not exactly rounded to the second. or maybe it's because they're unitted?
in the second case, locally the test passes but the timezones are different. i guess expect_equal
tests different things for datetimes on linux vs windows.
Fixed the second error - yep, linux vs windows matters. The first error persists:
1. Error: combine_ts works (@test-combine_ts.R#59) -----------------------------
unable to find an inherited method for function 'unitted' for signature '"difftime"'
1: expect_equal(mba$suntime[v(mba$DateTime) > "2015-03-09 22:59:59 UTC" & v(mba$DateTime) <
"2015-03-09 23:00:01 UTC"], base$suntime[v(base$DateTime) > "2015-03-09 22:59:59 UTC" &
v(base$DateTime) < "2015-03-09 23:00:01 UTC"]) at testthat/test-combine_ts.R:59
2: compare(object, expected, ...)
3: compare.POSIXt(object, expected, ...)
4: vector_equal_tol(x, y, tolerance = tolerance)
5: x - y
6: x - y
7: unitted_Ops(.Generic, e1, e2)
8: unitted_Ops(.Generic, e1, e2)
9: unitted(do.call(.Generic, list(deunitted(e1), deunitted(e2))), do.call(.Generic,
list(get_unitbundles(e1), get_unitbundles(e2))))
10: (function (classes, fdef, mtable)
{
methods <- .findInheritedMethods(classes, fdef, mtable)
if (length(methods) == 1L)
return(methods[[1L]])
else if (length(methods) == 0L) {
cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
stop(gettextf("unable to find an inherited method for function %s for signature %s",
sQuote(fdef@generic), sQuote(cnames)), domain = NA)
}
else stop("Internal error in finding inherited methods; didn't return a unique method",
domain = NA)
})(list("difftime"), structure(function (object, units = NA, ...)
{
standardGeneric("unitted")
}, generic = structure("unitted", package = "unitted"), package = "unitted", group = list(), valueClass = character(0), signature = c("object",
"units"), default = `\001NULL\001`, skeleton = (function (object, units = NA, ...)
stop("invalid call in method dispatch to 'unitted' (no default method)", domain = NA))(object,
units, ...), class = structure("nonstandardGenericFunction", package = "methods")),
<environment>)
11: stop(gettextf("unable to find an inherited method for function %s for signature %s",
sQuote(fdef@generic), sQuote(cnames)), domain = NA)
testthat results ================================================================
OK: 120 SKIPPED: 0 FAILED: 1
1. Error: combine_ts works (@test-combine_ts.R#59)
somehow, miraculously, appveyor just passed on my branch. https://ci.appveyor.com/project/aappling-usgs/mda-streams/build/1.0.202 - maybe it'll work here, too?