Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def tearDown(self):
for func in teardowns:
util.call_with_args_if_expected(func, self)
attr['tearDown'] = tearDown
def setUp(cls):
for func in cls.setups:
util.call_with_args_if_expected(func, self)
def setUp(self):
for func in setups:
util.call_with_args_if_expected(func, self)
attr['setUp'] = setUp
def tearDown(cls):
for func in cls.teardowns:
util.call_with_args_if_expected(func, self)
def __call__(self, testcase, *args):
# ... only if it takes an arg
self._helper = testcase
util.call_with_args_if_expected(self.func, testcase, *args)