+from pseudoku.grid import Grid
+from pseudoku.grid.constraints import Diagonal
+
+from pseudoku.tests import SudokuTestCase
+
+class DiagonalGridTestCase(SudokuTestCase):
+ """Tests that grids with extra non-standard constraints are solved."""
+
+
+ def test_main_diagonals(self):
+ grid = Grid.from_string("""
+ 3...2...7 ...3.1... ..6...4..
+ 89.....54 4...5...8 61.....32
+ ..8...2.. ...5.9... 1...6...9
+ """)
+ grid.add_constraint(Diagonal(grid, direction='down', offset=0))
+ grid.add_constraint(Diagonal(grid, direction='up', offset=0))
+ self.assertSolvable(grid, "Main diagonals (Color Sudoku, page 8)")