def test_rectangle(self): picture = Paint(15, 10) expected = """----------------- | xxxxx | | x x | | xxxxx | | | | | | | | | | | | | | | -----------------""" picture.rectangle(13, 1, 9, 3) self.assertEqual(str(picture.draw_me()), expected)
def test_floodfill(self): picture = Paint(15, 10) expected = """----------------- |ooooooooxxxxxoo| |oooooooox xoo| |ooooooooxxxxxoo| |ooooooooooooooo| |ooooooooooooooo| |ooooooooooooooo| |ooooooooooooooo| |ooooooooooooooo| |ooooooooooooooo| |ooooooooooooooo| -----------------""" picture.rectangle(13, 1, 9, 3) picture.bucket_fill(1, 9, "o") self.assertEqual(str(picture.draw_me()), expected)