def _create_console_formatter(spec_results=None, suite_results=None, browser_logs=None, seed=None, colors=False): spec_results = spec_results or ResultList([]) suite_results = suite_results or ResultList([]) browser_logs = browser_logs or [] return ConsoleFormatter( spec_results=spec_results, suite_results=suite_results, browser_logs=browser_logs, seed=seed, colors=colors, )
def result_list(): return ResultList([ Mock(status='passed', id='pass'), Mock(status='failed', id='fail'), Mock(status='pending', id='pend'), Mock(status='disabled', id='disable'), ])
def parse(self, items): result_list = ResultList() for item in self._filter_fields(items): result_list.add_result(item) return result_list
def test_format_suite_errors_empty(): formatter = _create_console_formatter(suite_results=ResultList([])) assert formatter.format_suite_failure() == ""