majorly changing the unittest compatibility code, calling TestCase(name)(result)

This commit is contained in:
holger krekel
2010-11-01 23:08:16 +01:00
parent 53d1cfc3a1
commit 7d495cc250
6 changed files with 50 additions and 45 deletions

View File

@@ -383,7 +383,8 @@ class Function(FunctionMixin, pytest.collect.Item):
config=config, collection=collection)
self._args = args
if self._isyieldedfunction():
assert not callspec, "yielded functions (deprecated) cannot have funcargs"
assert not callspec, (
"yielded functions (deprecated) cannot have funcargs")
else:
if callspec is not None:
self.funcargs = callspec.funcargs or {}