How to use the nose2.util.call_with_args_if_expected function in nose2

To help you get started, we’ve selected a few nose2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nose-devs / nose2 / nose2 / tools / such.py View on Github external
def tearDown(self):
                for func in teardowns:
                    util.call_with_args_if_expected(func, self)
            attr['tearDown'] = tearDown
github nose-devs / nose2 / nose2 / tools / such.py View on Github external
def setUp(cls):
            for func in cls.setups:
                util.call_with_args_if_expected(func, self)
github nose-devs / nose2 / nose2 / tools / such.py View on Github external
def setUp(self):
                for func in setups:
                    util.call_with_args_if_expected(func, self)
            attr['setUp'] = setUp
github nose-devs / nose2 / nose2 / tools / such.py View on Github external
def tearDown(cls):
            for func in cls.teardowns:
                util.call_with_args_if_expected(func, self)
github nose-devs / nose2 / nose2 / tools / such.py View on Github external
def __call__(self, testcase, *args):
        # ... only if it takes an arg
        self._helper = testcase
        util.call_with_args_if_expected(self.func, testcase, *args)