On 4 Jun 2017, at 02:50, Cyril Ferlicot D. <cyril.ferlicot@gmail.com> wrote:
Le 04/06/2017 à 02:26, monty a écrit :
I've seen this before, and I'm not sure it's a bug.
A testless, non-abstract subclass of a TestCase is useless unless it inherits test methods. But if it defines its own test methods, then it isn't clear if it was made a subclass to inherit test methods, or if it was made a subclass to inherit non-test helper methods, or both. I think to be safe it assumes the second.
Implement #shouldInheritSelectors in the superclass to get your intended behavior.
I think that in most case we want the tests from the superclass. At least this is what I expect.
A subclass of an object keep the behaviour of its superclass when the methods are not overridden. Why should it be different for tests?
I see your point but if that is the case I think it should inherit the tests by default and we could had a way to prevent this behaviour in some cases.
It is very awkward to get less tests after adding a new test in a class. I think it reduce the power of the tests.
I second that.
-- Cyril Ferlicot https://ferlicot.fr
http://www.synectique.eu 2 rue Jacques Prévert 01, 59650 Villeneuve d'ascq France