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