def collect(self): classes = get_classes(self.fspath.strpath, None) for case in classes: # Initialize the test class suite = case() # check test environment setup environ = TestEnviron(suite) methods = get_methods(suite, None) if not methods: return # Are we skipping? if safe_skip_call(environ.set_skip_if): return let_attrs = get_let_attrs(suite) # Set before all if any environ.set_before_all() for test in methods: yield KoniraItem(str(test), self, suite, test, let_attrs) # Set after all if any environ.set_after_all()
def runtest(self): # check test environment setup environ = TestEnviron(self.case) # Set before each if any environ.set_before_each() case = set_let_attrs(self.case, self.let_attrs) getattr(case, self.spec)() # Set after each if any environ.set_after_each()