implement a scope/parametrized examples using the so-far new features

also fix a bug with scoping/parametrization
This commit is contained in:
holger krekel
2012-07-20 14:16:50 +02:00
parent 396045e53f
commit 6b0f0adf5b
8 changed files with 222 additions and 6 deletions

View File

@@ -1030,8 +1030,11 @@ class FuncargRequest:
check_scope(self.scope, scope)
__tracebackhide__ = False
mp.setattr(self, "scope", scope)
kwargs = {}
if hasattr(self, "param"):
kwargs["extrakey"] = param
val = self.cached_setup(lambda: funcargfactory(request=self),
scope=scope)
scope=scope, **kwargs)
else:
val = funcargfactory(request=self)
mp.undo()