Merge pull request #5393 from nicoddemus/unittest-self-5390

item.obj is again a bound method on TestCase function items
This commit is contained in:
Anthony Sottile
2019-06-04 17:48:48 -07:00
parent 937f945946
commit 92432ac45c
3 changed files with 26 additions and 0 deletions

View File

@@ -114,6 +114,7 @@ class TestCaseFunction(Function):
def setup(self):
self._testcase = self.parent.obj(self.name)
self._fix_unittest_skip_decorator()
self._obj = getattr(self._testcase, self.name)
if hasattr(self, "_request"):
self._request._fillfixtures()
@@ -132,6 +133,7 @@ class TestCaseFunction(Function):
def teardown(self):
self._testcase = None
self._obj = None
def startTest(self, testcase):
pass