Exemplo n.º 1
0
def test_back_reverse_algorithm_not_possible_error2():
    with pytest.raises(domino_exceptions.ReverseAlgorithmNotPossibleError):
        move_domino_back(r'|||//\\\||', 1)
Exemplo n.º 2
0
def test_back_empty_input_string_error():
    with pytest.raises(domino_exceptions.EmptyInputStringError):
        move_domino_back('', 5)
Exemplo n.º 3
0
def test_back_not_allowable_char_error():
    with pytest.raises(domino_exceptions.NotAllowableCharError):
        move_domino_back(r'///a||\\\/|', 4)
Exemplo n.º 4
0
def test_back_invalid_input_data_types_error_neg_int():
    with pytest.raises(domino_exceptions.InvalidInputDataTypesError):
        move_domino_back('///', -2)
Exemplo n.º 5
0
def test_back_invalid_input_data_types_error_no_string():
    with pytest.raises(domino_exceptions.InvalidInputDataTypesError):
        move_domino_back(1, 2)
Exemplo n.º 6
0
def test_back_with_zero_moves():
    assert move_domino_back(r'||//||\||/\|', 0) == r'||//||\||/\|'
Exemplo n.º 7
0
def test_back_corner_cases():
    assert move_domino_back(r'|//', 1) == '|/|'
    assert move_domino_back(r'\\|', 1) == '|\\|'
Exemplo n.º 8
0
def test_back_with_correct_data():
    assert move_domino_back(r'||//|||', 1) == r'||/||||'
    assert move_domino_back(r'|||\\||', 1) == '||||\\||'