--- a/cubicweb/devtools/testlib.py Thu Feb 18 09:30:58 2016 +0100
+++ b/cubicweb/devtools/testlib.py Thu Feb 18 10:23:05 2016 +0100
@@ -23,6 +23,7 @@
from os.path import dirname, join, abspath
from math import log
from contextlib import contextmanager
+from inspect import isgeneratorfunction
from itertools import chain
from six import text_type, string_types
@@ -317,6 +318,14 @@
self._open_access = set()
super(CubicWebTC, self).__init__(*args, **kwargs)
+ def run(self, *args, **kwds):
+ testMethod = getattr(self, self._testMethodName)
+ if isgeneratorfunction(testMethod):
+ raise RuntimeError(
+ '%s appears to be a generative test. This is not handled '
+ 'anymore, use subTest API instead.' % self)
+ return super(CubicWebTC, self).run(*args, **kwds)
+
# repository connection handling ###########################################
def new_access(self, login):