예제 #1
0
def test_not_allowable_char_error():
    with pytest.raises(domino_exceptions.NotAllowableCharError):
        move_domino(r'///a||\\\/|', 4)
예제 #2
0
def test_with_correct_data():
    assert move_domino(r'||//||\||/\|', 1) == r'||///\\||/\|'
    assert move_domino(r'|\||\||/||\|', 2) == r'\\\\\||//\\|'
    assert move_domino(r'|\|\||||\/||', 4) == r'\\\\\\\\\///'
예제 #3
0
def test_empty_input_string_error():
    with pytest.raises(domino_exceptions.EmptyInputStringError):
        move_domino('', 5)
예제 #4
0
def test_invalid_input_data_types_error_neg_int():
    with pytest.raises(domino_exceptions.InvalidInputDataTypesError):
        move_domino('///', -2)
예제 #5
0
def test_invalid_input_data_types_error_no_string():
    with pytest.raises(domino_exceptions.InvalidInputDataTypesError):
        move_domino(1, 2)
예제 #6
0
def test_with_no_necessary_moves():
    assert move_domino(r'//////////', 10) == r'//////////'
예제 #7
0
def test_with_zero_moves():
    assert move_domino(r'||//||\||/\|', 0) == r'||//||\||/\|'