예제 #1
0
def test_is_valid_cell_value_placed(unsolved):
    cell = (5, 1)
    value = 1
    unsolved[cell] = value
    assert is_valid_cell(unsolved, cell) is True
예제 #2
0
def test_is_not_valid_cell_row_value_placed(unsolved):
    cell = (2, 4)
    value = 6
    unsolved[cell] = value
    assert is_valid_cell(unsolved, cell) is False
예제 #3
0
def test_is_not_valid_cell_column(unsolved):
    cell = (6, 6)
    value = 8
    assert is_valid_cell(unsolved, cell, value) is False
예제 #4
0
def test_is_not_valid_cell_box(unsolved):
    cell = (1, 4)
    value = 7
    assert is_valid_cell(unsolved, cell, value) is False
예제 #5
0
def test_is_valid_cell(unsolved):
    cell = (5, 1)
    value = 1
    assert is_valid_cell(unsolved, cell, value) is True
예제 #6
0
def test_is_not_valid_cell_row(unsolved):
    cell = (2, 4)
    value = 6
    assert is_valid_cell(unsolved, cell, value) is False
예제 #7
0
def test_is_valid_cell_zero_placed(one_missing):
    cell = (4, 4)
    assert is_valid_cell(one_missing, cell) is False
예제 #8
0
def test_is_valid_cell_zero(one_missing):
    cell = (0, 0)
    value = 0
    assert is_valid_cell(one_missing, cell, value) is False
예제 #9
0
def test_is_not_valid_cell_already_placed(solved):
    cell = (4, 4)
    value = solved[cell] + 1
    assert is_valid_cell(solved, cell, value) is False
예제 #10
0
def test_is_valid_cell_already_placed_wrong(solved):
    cell = (4, 4)
    value = solved[cell]
    solved[cell] = value + 1
    assert is_valid_cell(solved, cell, value) is True
예제 #11
0
def test_is_valid_cell_already_placed(solved):
    cell = (4, 4)
    value = solved[cell]
    assert is_valid_cell(solved, cell, value) is True
예제 #12
0
def test_is_not_valid_cell_box_value_placed(unsolved):
    cell = (1, 4)
    value = 7
    unsolved[cell] = value
    assert is_valid_cell(unsolved, cell) is False
예제 #13
0
def test_is_not_valid_cell_column_value_placed(unsolved):
    cell = (6, 6)
    value = 8
    unsolved[cell] = value
    assert is_valid_cell(unsolved, cell) is False