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

test_dir() does not set TESTTHAT_PKG env var #787

Closed
jennybc opened this issue Aug 4, 2018 · 2 comments
Closed

test_dir() does not set TESTTHAT_PKG env var #787

jennybc opened this issue Aug 4, 2018 · 2 comments

Comments

@jennybc
Copy link
Member

jennybc commented Aug 4, 2018

devtools::test() calls testthat::test_dir(), which doesn't set the TESTTHAT_PKG env var. I get this failure using devtools::test() on testthat itself:

✖ |  12 1     | test_dir [0.1 s]
─────────────────────────────────────────────────────────────
test-test_dir.R:12: failure: TESTHAT_PKG env var set to the package being tested
testing_package() not equal to "testthat".
1/1 mismatches
x[1]: ""
y[1]: "testthat"
@lionel-
Copy link
Member

lionel- commented Nov 22, 2018

We also need this for the new deprecation tools, so we can check that the caller inherits from the namespace of the package being tested and only warn then.

lionel- added a commit to lionel-/rlang that referenced this issue Nov 23, 2018
lionel- added a commit to lionel-/rlang that referenced this issue Nov 23, 2018
@lionel-
Copy link
Member

lionel- commented Nov 23, 2018

Thanks!

lionel- added a commit to lionel-/rlang that referenced this issue Dec 10, 2018
HughParsonage pushed a commit to HughParsonage/devtools that referenced this issue Jul 2, 2019
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

No branches or pull requests

2 participants