def test_correctly_count_painted_panels(): canvas = Canvas() canvas.draw_at(Coord(42, 55), 1) canvas.draw_at(Coord(42, 55), 0) canvas.draw_at(Coord(1, 2), 1) assert canvas.count_painted_panels() == 2