Пример #1
0
 def test_example(self):
     grid = [
         [1, 0, 0, 1, 1],
         [0, 0, 0, 0, 1],
         [1, 1, 1, 1, 1]]
     self.assertEqual(9, get_num_lights_on(grid))
Пример #2
0
 def test_example_full(self):
     grid = [[1 for _ in xrange(1000)] for _ in xrange(1000)]
     self.assertEqual(1000000, get_num_lights_on(grid))
Пример #3
0
 def test_all_zeroes(self):
     grid = get_1000_by_1000_grid()
     self.assertEqual(0, get_num_lights_on(grid))