def test_turn_off_multiple_light(self): grid = Grid() self.assertEqual(0, grid.lights_on_count()) grid.turn_on(0, 0, 4, 4) self.assertEqual(25, grid.lights_on_count()) grid.turn_off(0, 0, 1, 1) self.assertEqual(21, grid.lights_on_count())
def test_turn_on_one_light(self): grid = Grid() self.assertEqual(0, grid.lights_on_count()) grid.turn_on(0, 0, 0, 0) self.assertEqual(1, grid.lights_on_count()) grid.turn_on(0, 0, 0, 0) self.assertEqual(1, grid.lights_on_count())