def test_board_evaluate_move_with_None(): with pytest.raises(ValueError): b = Board(max_row=4, row_size=3, min_val=1, max_val=3, solution=[1, 1, 2]) m = [None, 2, 2] r = b.evaluate(m) print(r)
def test_board_evaluate_all_wrong(): rs = 3 b = Board(max_row=4, row_size=rs, min_val=1, max_val=3, solution=[1, 2, 3]) m = [3, 1, 2] r = b.evaluate(m) assert r["good"] == 0 and r["wrong"] == rs
def test_board_evaluate_122_112_count_the_1_move_for_only_one_1(): b = Board(max_row=4, row_size=3, min_val=1, max_val=3, solution=[1, 1, 2]) m = [1, 2, 2] r = b.evaluate(m) print(r) assert r["good"] == 2 and r["wrong"] == 0
def test_board_evaluate_nothing(): b = Board(max_row=4, row_size=3, min_val=1, max_val=3, solution=[1, 2, 2]) m = [3, 3, 3] r = b.evaluate(m) assert r["good"] == 0 and r["wrong"] == 0