def test_summary_one_failed_one_missing(): answers = [ testResultFailed, testResultMissing, ] assert summarize_answers( answers) == '1 of 2 required tests failed, 1 result missing'
def test_summary_one_passed_one_invalid_gating_yaml_one_missing(): answers = [ testResultPassed, testResultMissing, testInvalidGatingYaml, ] assert summarize_answers( answers) == '1 of 3 required tests failed, 1 result missing'
def test_summary_one_passed_one_failed_one_missing_two_errored(): answers = [ testResultErrored, testResultPassed, testResultFailed, testResultMissing, testResultErrored, ] assert summarize_answers( answers) == '3 of 5 required tests failed, 1 result missing (2 errors)'
def summary(self): return summarize_answers(self.answers)
def test_summary_one_passed_one_missing_waived(): answers = [ testResultPassed, TestResultWaived(testResultMissing), ] assert summarize_answers(answers) == 'All required tests passed'
def test_summary_one_passed_one_missing(): answers = [ testResultPassed, testResultMissing, ] assert summarize_answers(answers) == '1 of 2 required test results missing'
def test_summary_one_passed_one_failed(): answers = [ testResultPassed, testResultFailed, ] assert summarize_answers(answers) == '1 of 2 required tests failed'
def test_summary_errored(): answers = [ testResultErrored, ] assert summarize_answers( answers) == '1 of 1 required tests failed (1 error)'
def test_summary_missing(): answers = [ testResultMissing, ] assert summarize_answers(answers) == '1 of 1 required test results missing'
def test_summary_failed(): answers = [ testResultFailed, ] assert summarize_answers(answers) == '1 of 1 required tests failed'
def test_summary_empty(): answers = [] assert summarize_answers(answers) == 'no tests are required'
def test_summary_passed(): answers = [ testResultPassed, ] assert summarize_answers(answers) == 'All required tests passed'
def test_summary_invalid_gating_yaml(): answers = [ testInvalidGatingYaml, ] assert summarize_answers(answers) == '1 of 1 required tests failed'