Skip to content

test actually loaded environment with devtools #16

@cbeleites

Description

@cbeleites

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions