From dc59b9af732c23caeacac54604df8ed40e8fd247 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Thu, 1 Sep 2016 11:03:49 +0100 Subject: Hack at our included py.test to fail, not quietly skip, when it sees a TestXxx class with an __init__() method --- _pytest/python.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '_pytest') diff --git a/_pytest/python.py b/_pytest/python.py index a882dec70e..42c45f9f42 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -498,7 +498,10 @@ class Class(PyCollector): """ Collector for test methods. """ def collect(self): if hasinit(self.obj): - pytest.skip("class %s.%s with __init__ won't get collected" % ( + # XXX used to be skip(), but silently skipping classes + # XXX just because they have been written long ago is + # XXX imho a very, very, very bad idea + pytest.fail("class %s.%s with __init__ won't get collected" % ( self.obj.__module__, self.obj.__name__, )) -- cgit v1.2.3-65-gdbad