The unittest.skip decorator runs @functools.wraps on self._testcase. functools.wraps expects a "__name__" attribute and this patch adds one. It might not be the correct fix, but it works for me.
This commit is contained in:
LeeKamentsky 2015-11-04 13:52:40 -05:00
parent af2d391903
commit 8de2c035e2
1 changed files with 1 additions and 0 deletions

View File

@ -134,6 +134,7 @@ class TestCaseFunction(pytest.Function):
pass
def runtest(self):
setattr(self._testcase, "__name__", self.name)
self._testcase(result=self)
def _prunetraceback(self, excinfo):