Exemple #1
0
 def test_allPositions_squares(self):
     self.assertEqual([(0, 0)], list(allPositions((1, 1))))
     self.assertEqual([(0, 0), (0, 1), (1, 0), (1, 1)], list(allPositions((2, 2))))
     self.assertEqual(
         [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)], list(allPositions((3, 3)))
     )
Exemple #2
0
 def test_allPositions_rects(self):
     self.assertEqual([(0, 0), (0, 1)], list(allPositions((1, 2))))
     self.assertEqual([(0, 0), (1, 0)], list(allPositions((2, 1))))
Exemple #3
0
 def test_allPositions_empty(self):
     self.assertEqual([], list(allPositions((0, 0))))