def test_validate_choice1(): choices = [0, 1, '2', 3, 'four'] for choice in choices: assert_equal(validate_choice(choice, choices), choice)
def test_validate_choice2(): choices = [0, 1, 2] bads = ['0', '1', '2'] for choice in bads: with pytest.raises(ValueError): validate_choice(choice, choices)
def test_validate_choice1(): choices = [0, 1, '2', 3, 'four'] for choice in choices: assert validate_choice(choice, choices) == choice