def assert_problem_has_answer(step, problem_type, answer_class): ''' Assert that the problem is displaying a particular answer. These correspond to the same correct/incorrect answers we set in answer_problem() We can also check that a problem has been left blank by setting answer_class='blank' ''' assert answer_class in ['correct', 'incorrect', 'blank'] assert problem_type in PROBLEM_DICT problem_has_answer(world.scenario_dict['COURSE'].number, problem_type, answer_class)
def assert_problem_has_answer(step, problem_type, answer_class): ''' Assert that the problem is displaying a particular answer. These correspond to the same correct/incorrect answers we set in answer_problem() We can also check that a problem has been left blank by setting answer_class='blank' ''' assert answer_class in ['correct', 'incorrect', 'blank'] assert problem_type in PROBLEM_DICT problem_has_answer(problem_type, answer_class)
def assert_problem_has_answer(step, problem_type, answer_class): """ Assert that the problem is displaying a particular answer. These correspond to the same correct/incorrect answers we set in answer_problem() We can also check that a problem has been left blank by setting answer_class='blank' """ assert answer_class in ["correct", "incorrect", "blank"] assert problem_type in PROBLEM_DICT problem_has_answer(problem_type, answer_class)