def get_solution(problem_str, corrects, incorrects):
    solution = corrects.get(problem_str)
    if solution:
        print(f"Known solution {problem_str} : {solution}")
    else:
        solution = cafeize(problem_str)
        if solution in incorrects[problem_str]:
            print(f"Known incorrect {problem_str} : {solution}")
            solution = None
        else:
            print(f"New problem {problem_str} : {solution}")
    return solution
Exemplo n.º 2
0
def test_wrong_results(input_str, unexpected_str):
    assert cafeize(input_str) != unexpected_str.lower()
Exemplo n.º 3
0
def test_cafe18(input_str, expected_str):
    assert cafeize(input_str) == expected_str.lower()
def test_incorrect_generated(input_str, unexpected_str):
    output = cafeize(input_str)
    assert output != unexpected_str.lower()
def test_correct_generated(input_str, expected_str):
    assert cafeize(input_str) == expected_str.lower()