You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the [.data.frame method seems to be incorrectly called when using [ on a data.table during test_package (but not test_file), which results in an "object not found" error.
I expected that tests should pass using both test_package and test_file, but tests only pass using test_file.
maudelaperriere@mbpdemaperriere:~/toby/r/testdtbug(master)$ LANG=EN R --vanilla -e 'testthat::test_package("testdtbug")'
R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
5: Setting LC_MONETARY failed, using "C"
> testthat::test_package("testdtbug")
-- 1. Error: dt [ method ok (@test-dt.R#5) ------------------------------------
object 'foo' not found
Backtrace:
1. ...[] tests/testthat/test-dt.R:5:2
4. testthat::expect_identical(foo, "bar") tests/testthat/test-dt.R:6:4
5. testthat::quasi_label(enquo(object), label, arg = "object")
6. rlang::eval_bare(expr, quo_get_env(quo))
== testthat results ===========================================================
[ OK: 0 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
1. Error: dt [ method ok (@test-dt.R#5)
Error: testthat unit tests failed
Execution halted
maudelaperriere@mbpdemaperriere:~/toby/r/testdtbug(master)$ LANG=EN R --vanilla -e 'testthat::test_file(system.file("tests", "testthat", "test-dt.R", package="testdtbug"));devtools::session_info()'
R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
5: Setting LC_MONETARY failed, using "C"
> testthat::test_file(system.file("tests", "testthat", "test-dt.R", package="testdtbug"));devtools::session_info()
v | OK F W S | Context
v | 2 | dt
== Results =====================================================================
Duration: 0.3 s
OK: 2
Failed: 0
Warnings: 0
Skipped: 0
- Session info ---------------------------------------------------------------
setting value
version R version 3.3.3 (2017-03-06)
os OS X Mavericks 10.9.5
system x86_64, darwin13.4.0
ui X11
language (EN)
collate C
ctype C
tz America/Phoenix
date 2019-09-04
- Packages -------------------------------------------------------------------
package * version date lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.3.3)
backports 1.1.4 2019-04-10 [1] CRAN (R 3.3.3)
callr 3.3.1 2019-07-18 [1] CRAN (R 3.3.3)
cli 1.1.0 2019-03-19 [1] CRAN (R 3.3.3)
crayon 1.3.4 2017-09-16 [1] CRAN (R 3.3.2)
data.table * 1.12.2 2019-04-07 [1] CRAN (R 3.3.3)
desc 1.2.0 2018-05-01 [1] CRAN (R 3.3.3)
devtools 2.1.0 2019-07-06 [1] CRAN (R 3.3.3)
digest 0.6.20 2019-07-04 [1] CRAN (R 3.3.3)
fs 1.3.1 2019-05-06 [1] CRAN (R 3.3.3)
glue 1.3.1 2019-03-12 [1] CRAN (R 3.3.3)
magrittr 1.5 2014-11-22 [1] CRAN (R 3.3.0)
memoise 1.1.0 2017-04-21 [1] CRAN (R 3.3.2)
pkgbuild 1.0.5 2019-08-26 [1] CRAN (R 3.3.3)
pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.3.3)
prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.3.0)
processx 3.4.1 2019-07-18 [1] CRAN (R 3.3.3)
ps 1.3.0 2018-12-21 [1] CRAN (R 3.3.3)
R6 2.4.0 2019-02-14 [1] CRAN (R 3.3.3)
Rcpp 1.0.2 2019-07-25 [1] CRAN (R 3.3.3)
remotes 2.1.0 2019-06-24 [1] CRAN (R 3.3.3)
rlang 0.4.0.9002 2019-09-04 [1] Github (r-lib/rlang@15e799c)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.3.2)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.3.3)
testthat * 2.2.1.9000 2019-09-04 [1] Github (r-lib/testthat@213d5ef)
usethis 1.5.1 2019-07-04 [1] CRAN (R 3.3.3)
withr 2.1.2 2018-03-15 [1] CRAN (R 3.3.3)
[1] /Library/Frameworks/R.framework/Versions/3.3/Resources/library
>
>
maudelaperriere@mbpdemaperriere:~/toby/r/testdtbug(master)$
The text was updated successfully, but these errors were encountered:
This is almost certainly because of the way that data.table checks for whether or not it's in a data.table aware environment, and is unlikely to be directly related to testthat.
the [.data.frame method seems to be incorrectly called when using [ on a data.table during test_package (but not test_file), which results in an "object not found" error.
I expected that tests should pass using both test_package and test_file, but tests only pass using test_file.
the code to reproduce the error is:
The output on my system was:
This also happens when running R --vanilla:
The text was updated successfully, but these errors were encountered: