Skip to content

Commit aa1ca46

Browse files
Weaken testing of Date, POSIXct objects
1 parent 2b7eb4c commit aa1ca46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/test.data.table.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
515515
}
516516
if (!fail && !length(error) && (!length(output) || !missing(y))) { # TODO test y when output=, too
517517
capture.output(y <- try(y, silent=TRUE)) # y might produce verbose output, just toss it
518+
if (inherits(x, c("Date", "POSIXct"))) storage.mode(x) <- "numeric"
519+
if (inherits(y, c("Date", "POSIXct"))) storage.mode(y) <- "numeric"
518520
if (identical(x,y)) return(invisible(TRUE))
519521
all.equal.result = TRUE
520522
if (is.data.frame(x) && is.data.frame(y)) {

0 commit comments

Comments
 (0)