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.
Unfortunately, when an error occurs, only the method docstring is displayed, not the class, making the error ambiguous as to which test failed.
The exception message would be improved if it included the name of the test class.
Yup this has bedeviled me for ages. Surprised I never made my own ticket for it. Thanks for the report! Happy to consider a patch if you come up with one.
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.
Unfortunately, when an error occurs, only the method docstring is displayed, not the class, making the error ambiguous as to which test failed.
The exception message would be improved if it included the name of the test class.