Skip to content

Commit

Permalink
Elaborate on the use of options()
Browse files Browse the repository at this point in the history
  • Loading branch information
aitap committed Feb 11, 2025
1 parent 73aa747 commit 81b09fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/test.data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,9 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
out = capture.output(print(x <- suppressMessages(withCallingHandlers(tryCatch(x, error=eHandler), warning=wHandler, message=mHandler))))
}
if (!is.null(options)) {
# some of the options passed to test() may break internal data.table use below (e.g. invalid datatable.alloccol), so undo them ASAP
base::options(old_options)
# this is still registered for on.exit(), keep empty
old_options <- list()
}
fail = FALSE
Expand Down

0 comments on commit 81b09fb

Please sign in to comment.