Exemplo n.º 1
0
 def test_get_block_num0(self):
     """Test that block number = 0"""
     expected = 0
     actual = sudoku.get_block_num(0, 0)
     self.assertEqual(actual, expected)
     actual = sudoku.get_block_num(2, 2)
     self.assertEqual(actual, expected)
     actual = sudoku.get_block_num(2, 0)
     self.assertEqual(actual, expected)
     actual = sudoku.get_block_num(0, 2)
     self.assertEqual(actual, expected)
Exemplo n.º 2
0
 def test_get_block_num4(self):
     """Test that block number = 4"""
     expected = 4
     actual = sudoku.get_block_num(3, 3)
     self.assertEqual(actual, expected)
     actual = sudoku.get_block_num(5, 5)
     self.assertEqual(actual, expected)
     actual = sudoku.get_block_num(3, 5)
     self.assertEqual(actual, expected)
     actual = sudoku.get_block_num(5, 3)
     self.assertEqual(actual, expected)