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))
def test_example_full(self): grid = [[1 for _ in xrange(1000)] for _ in xrange(1000)] self.assertEqual(1000000, get_num_lights_on(grid))
def test_all_zeroes(self): grid = get_1000_by_1000_grid() self.assertEqual(0, get_num_lights_on(grid))