Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto_test_package() object 'path' not found #1211

Closed
mbojan opened this issue Oct 31, 2020 · 1 comment · Fixed by #1212
Closed

auto_test_package() object 'path' not found #1211

mbojan opened this issue Oct 31, 2020 · 1 comment · Fixed by #1212

Comments

@mbojan
Copy link
Contributor

mbojan commented Oct 31, 2020

With R's working directory in root of package sources I'm getting:

auto_test_package()
## Error in pkgload::pkg_path(path) : object 'path' not found
Session info
─ Session info ───────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.0.3 (2020-10-10)
 os       Ubuntu 18.04.5 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language en_US                       
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       Europe/Warsaw               
 date     2020-10-31                  

─ Packages ───────────────────────────────────────────────────────────────────────────────────
 package     * version    date       lib source        
 assertthat    0.2.1      2019-03-21 [1] CRAN (R 4.0.0)
 backports     1.1.10     2020-09-15 [1] CRAN (R 4.0.2)
 cli           2.1.0      2020-10-12 [1] CRAN (R 4.0.3)
 crayon        1.3.4      2017-09-16 [1] CRAN (R 4.0.0)
 desc          1.2.0      2018-05-01 [1] CRAN (R 4.0.0)
 fansi         0.4.1      2020-01-08 [1] CRAN (R 4.0.0)
 glue          1.4.2      2020-08-27 [1] CRAN (R 4.0.2)
 magrittr      1.5        2014-11-22 [1] CRAN (R 4.0.0)
 pkgload       1.1.0      2020-05-29 [1] CRAN (R 4.0.0)
 R6            2.5.0      2020-10-28 [1] CRAN (R 4.0.3)
 rlang         0.4.8      2020-10-08 [1] CRAN (R 4.0.2)
 rprojroot     1.3-2      2018-01-03 [1] CRAN (R 4.0.0)
 rstudioapi    0.11       2020-02-07 [1] CRAN (R 4.0.0)
 sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 4.0.0)
 testthat      3.0.0.9000 2020-10-31 [1] Github (r-lib/testthat@b78e9a9)
 withr         2.3.0      2020-09-22 [1] CRAN (R 4.0.2)

[1] /home/mbojan/R/library/4.0
[2] /usr/local/lib/R/site-library
[3] /usr/lib/R/site-library
[4] /usr/lib/R/library
@mbojan
Copy link
Contributor Author

mbojan commented Oct 31, 2020

I believe

path <- pkgload::pkg_path(path)

should use pkg instead of path?

mbojan added a commit to mbojan/testthat that referenced this issue Oct 31, 2020
hadley pushed a commit that referenced this issue Dec 1, 2020
* Typo in auto_test_package(). Fixes #1211.
* auto_test_package() calls test_dir(stop_on_failure=FALSE). Fixes #1214.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant