示例#1
0
def test_incorrect_quadrant_row():
    quadrant = [
        [1, 2, 3],
        [4, 6, 6],
        [7, 8, 9]
    ]
    actual = sudoku_verifier.is_quadrant_solved(quadrant, 0)
    assert actual is False
示例#2
0
def test_correct_quadrant():
    quadrant = [
        [1, 2, 3],
        [4, 5, 6],
        [7, 8, 9]
    ]
    actual = sudoku_verifier.is_quadrant_solved(quadrant, 0)
    assert actual is True
示例#3
0
def test_incomplete_quadrant():
    quadrant = [
        [1, 2, 3],
        [4, None, 6],
        [7, 8, 9]
    ]
    actual = sudoku_verifier.is_quadrant_solved(quadrant, 0)
    assert actual is False
示例#4
0
def test_correct_quadrant_column_offset_1():
    quadrant = [
        [None, None, None, 1, 2, 3],
        [None, None, None, 4, 5, 6],
        [None, None, None, 7, 8, 9]
    ]
    actual = sudoku_verifier.is_quadrant_solved(quadrant, 3)
    assert actual is True
示例#5
0
def test_correct_quadrant_row_offset_1():
    quadrant = [
        [None, None, None],
        [None, None, None],
        [None, None, None],
        [1, 2, 3],
        [4, 5, 6],
        [7, 8, 9]
    ]
    actual = sudoku_verifier.is_quadrant_solved(quadrant, 1)
    assert actual is True