Skip to content

test_local() breaks when testing certain parallelized functions; test_dir() does not have a problem #1417

Open
@lutzgruber-quantco

Description

@lutzgruber-quantco

Hi everyone,

I ran into a problem testing my package with devtools::test() / testthat::test_local() that does not appear when calling my function directly or testing it with testthat::test_dir().

The problem is a runtime error there is no package called ‘demo’, which appears when the worker function calls dplyr::summarize; a similar worker function that does not call dplyr::summarize passes the tests.

I prepared a markdown with a reproducible example at https://github.com/lutzgruber-quantco/demo

Could you please advise why testthat::test_local() fails here, and possibly solve this error?

Thank you,
Lutz

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorparallel ⇶

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions