Exemple #1
0
    def test_create_text(self):
        # SETUP
        expected_report = """\
create_text
    100
    200
    anchor='s'
    font=('Arial', 8, 'normal')
    text='foo'"""

        # EXEC
        canvas = Canvas()
        canvas.create_text(100,
                           200,
                           text='foo',
                           font=('Arial', 8, 'normal'),
                           anchor='s')
        report = canvas.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)