def _run_fixture(fixture): name, assert_results, halt = runner.run_fixture(fixture) if assert_results is None: return None, halt test_result = TestResult(name) test_result.extend(assert_results) return test_result, halt
def _run_test(test): name, assert_results = runner.run_test(test) if assert_results is None: return None test_result = TestResult(name) test_result.extend(assert_results) return test_result
def __call__(self): self._set_self() before_result, halt = _run_fixture(self.before) results = TestResult(self._test.name) if halt else _run_test( self._test) results.before = before_result results.after, halt = _run_fixture(self.after) return results
def init_results(test_name): global results results = TestResult(test_name)