Skip to content

Test failures don't show class name #41

Description

@mehaase

I wrote a package that can interface with several different database systems (e.g. MySQL and Postgres). I wrote my integration tests as an abstract base class, and then wrote a concrete implementation for each database system. This way, each database runs the same battery of integration tests.

The downside of this approach is that all the test methods are shared between the test classes, so they all print out the same docstring when they run. If a test fails, it's not obvious which test class the failure occurred in.

Spec seems like a nice solution to this, since it clearly identifies which test class is running.

test runner output

Unfortunately, when an error occurs, only the method docstring is displayed, not the class, making the error ambiguous as to which test failed.

test exception

The exception message would be improved if it included the name of the test class.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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