def test_create_line(self): # SETUP expected_report = """\ create_line 1 2 100 200""" # EXEC canvas = Canvas() # noinspection PyUnresolvedReferences canvas.create_line(1, 2, 100, 200) report = canvas.build_report() # VERIFY self.assertEqual(expected_report.splitlines(), report)
def test_create_text(self): # SETUP expected_report = """\ create_text 100 200 anchor='s' font=('Arial', 8, 'normal') text='foo'""" # EXEC canvas = Canvas() # noinspection PyUnresolvedReferences canvas.create_text(100, 200, text='foo', font=('Arial', 8, 'normal'), anchor='s') report = canvas.build_report() # VERIFY self.assertEqual(expected_report.splitlines(), report)
def test_multiple_calls(self): # SETUP expected_report = """\ create_line 1 2 100 200 create_rectangle 5 10 500 1000""" # EXEC canvas = Canvas() # noinspection PyUnresolvedReferences canvas.create_line(1, 2, 100, 200) # noinspection PyUnresolvedReferences canvas.create_rectangle(5, 10, 500, 1000) report = canvas.build_report() # VERIFY self.assertEqual(expected_report.splitlines(), report)