GRID_NAMES = ["is valid", "is valid containing None values", "is valid containing None values (2)", \
"has an invalid row", "has an invalid column", "has an invalid subgrid"]
GRID_RETURNS = ["True","True","True","False","False","False"]
n = None
a = 'a'
b = 'b'
c = 'c'
d = 'd'
e = 'e'
f = 'f'
g = 'g'
GRID_VALID = [[7,3,5, 6,1,4, 8,9,2],
[8,4,2, 9,7,3, 5,6,1],
[9,6,1, 2,8,5, 3,7,4],
[2,8,6, 3,4,9, 1,5,7],
[4,1,3, 8,5,7, 9,2,6],
[5,7,9, 1,2,6, 4,3,8],
[1,5,7, 4,9,2, 6,8,3],
[6,9,4, 7,3,8, 2,1,5],
[3,2,8, 5,6,1, 7,4,9]
]
GRID_VALID_NONE = [[7,3,5, 6,1,4, 8,9,2],
[8,4,2, 9,7,3, 5,6,1],
[9,6,1, 2,8,5, 3,7,4],
[2,n,n, 3,4,n, 1,5,7],
[4,1,3, 8,5,7, 9,2,6],
[5,7,9, 1,2,6, 4,3,8],
[1,5,7, 4,9,n, 6,8,3],
[6,9,4, 7,3,8, 2,1,5],
[n,2,8, 5,6,1, 7,4,9]
]
GRID_VALID_NONE_2 = [[7,3,5, 6,1,4, n,9,2],
[8,4,2, 9,7,3, 5,6,1],
[n,n,1, 2,8,5, 3,7,4],
[2,n,n, 3,4,n, 1,5,7],
[4,1,3, 8,5,7, 9,2,6],
[5,n,9, 1,2,6, 4,3,8],
[1,5,7, 4,9,n, n,8,3],
[6,9,4, 7,3,8, 2,1,5],
[n,2,8, 5,6,1, 7,4,n]
]
GRID_INVALID_SUBGRID = [[7,3,5, 6,1,4, 8,9,2],
[8,4,2, 9,7,3, 5,6,1],
[9,6,1, 2,8,5, 3,7,4],
[2,8,6, 3,4,9, 1,5,7],
[4,1,3, n,5,7, 9,2,6],
[5,7,9, 1,2,6, 4,3,8],
[1,5,7, 4,9,2, 6,8,3],
[6,9,4, 7,3,8, 2,1,5],
[3,2,n, 8,6,1, 7,4,9]
]
GRID_INVALID_ROW = [[7,3,5, 6,1,4, 8,9,2],
[8,4,2, 9,7,3, 5,6,1],
[9,6,1, 2,8,5, 3,7,4],
[2,8,6, 3,4,9, 1,5,7],
[4,1,3, 8,5,7, 9,2,6],
[5,7,9, 1,2,6, 4,3,8],
[1,5,7, 4,9,2, 6,8,n],
[6,9,4, 7,3,8, 2,1,3],
[3,2,8, 5,6,1, 7,4,9]
]
GRID_INVALID_COLUMN = [[7,3,5, 6,1,4, 8,9,2],
[8,4,2, 9,7,3, 5,6,1],
[9,6,1, 2,8,5, 3,7,4],
[2,8,6, 3,4,9, 1,5,7],
[4,1,3, 8,5,7, 9,2,6],
[5,7,9, 1,2,6, 4,3,8],
[1,5,n, 4,9,2, 6,8,3],
[6,9,4, 7,3,8, 2,1,5],
[7,2,8, 5,6,1, n,4,9]
]
GRIDS = [GRID_VALID, GRID_VALID_NONE, GRID_VALID_NONE_2, \
GRID_INVALID_ROW, GRID_INVALID_COLUMN, GRID_INVALID_SUBGRID]
GRID_SMALL_VALID = [[1,2, 3,4],
[3,4, 1,2],
[2,3, 4,1],
[4,1, 2,3]]
GRID_SMALL_VALID_NONE = [[1,n, 3,4],
[3,4, n,n],
[2,n, 4,1],
[4,1, n,3]]
GRID_SMALL_VALID_NONE_2 = [[1,n, 3,4],
[n,n, n,2],
[2,n, 4,1],
[4,n, 2,3]]
GRID_SMALL_INVALID_ROW = [[1,2, 3,n],
[2,3, 4,4],
[3,4, 1,2],
[4,1, 2,3]]
GRID_SMALL_INVALID_COLUMN = [[1,2, 3,4],
[2,3, 4,1],
[3,4, n,1],
[4,1, 2,3]]
GRID_SMALL_INVALID_SUBGRID = [[1,2, 3,4],
[2,3, 4,1],
[3,4, 1,2],
[4,1, 2,3]]
GRIDS_SMALL = [GRID_SMALL_VALID, GRID_SMALL_VALID_NONE, GRID_SMALL_VALID_NONE_2, \
GRID_SMALL_INVALID_ROW, GRID_SMALL_INVALID_COLUMN, GRID_SMALL_INVALID_SUBGRID]
GRID_BIG_VALID = [[4,a,9,f, 1,7,d,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