Skip to content

Add @assertExceptionRaisedRegEx test (similar to python unitest assertRaisesRegex)? #14

@ekluzek

Description

@ekluzek

I'm finding that in my unit-tests with pFUnit if I update the error message that aborts I also have to update the unit-tester. This is for example annoying when you add something that gives the filename and line number in the error message as well.

In python unittest there is an assertRaisesRegEx function that helps with this. Could something similar be added to pFUnit? It seems like this should be fairly easy to add, albeit the complexity of Regular expressions might be difficult. But, maybe it just does a simpler pattern match at first? Does the error message contain the given substring for example?

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