Skip to content

Unit test warnings about custom error conditions #112

@wlandau

Description

@wlandau

After recent developments to testthat, expect_error() throws a warning for custom error conditions. Example:

test-storr.R:243: warning: get_value
`st$get_value("nosuchhash")` generated a condition with class HashError/error/condition.
It is less fragile to test custom conditions with `class`

The solution is simple: just supply a class argument to expect_error(). I will put together a PR after we resolve #111.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions