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
currently, unittest() uses getNamespace() which will return the installed package.
When the package is loaded via devtools, that version should be tested: hySpc.testthat::unittest() should first check whether ns %in% devtools::dev_packages(). If so, it's a package loaded by devtools.
In that case, look recursively through parent.env(.GlobalEnv) for paste0("package:", ns).
Otherwise, getNamespace() is the way to go.
The text was updated successfully, but these errors were encountered:
currently,
unittest()
usesgetNamespace()
which will return the installed package.When the package is loaded via devtools, that version should be tested:
hySpc.testthat::unittest()
should first check whetherns %in% devtools::dev_packages()
. If so, it's a package loaded by devtools.In that case, look recursively through
parent.env(.GlobalEnv)
forpaste0("package:", ns)
.Otherwise,
getNamespace()
is the way to go.The text was updated successfully, but these errors were encountered: