Skip to content

Error strings accessed differently in pytest 5.x #52

@standage

Description

@standage

Until now, I've been using this approach to check error strings in the test suite.

with pytest.raises(ValueError) as ve:
    microhapulator.some.operation(baddata)
assert 'expected error message' in str(ve)

The str(ve) approach no longer works with pytest 5.x. The pytest version has been pinned temporarily in the CI configuration, but this should be addressed soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions