Skip to content

Package dependency on testthat seems to be incorrect #151

@atheriel

Description

@atheriel

The testthat package is listed as Suggests, but load_all() calls library(testthat):

> pkgload::load_all()
ℹ Loading <my-package>
Error in ("base" %:::% "library")("testthat", warn.conflicts = FALSE) : 
  there is no package calledtestthat> traceback()
3: stop(packageNotFoundError(package, lib.loc, sys.call()))
2: ("base" %:::% "library")("testthat", warn.conflicts = FALSE)
1: pkgload::load_all()

To reproduce:

  1. Uninstall testthat.
  2. Run pkgload::load_all() on any package.

I think this could be fixed by checking if testthat is present beforehand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions