aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/python.py5
1 files changed, 4 insertions, 1 deletions
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__,
))