示例#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'||//||\||/\|'