Exemplo n.º 1
0
def test_dot(patched_turtle):
    t2 = MockTurtle()
    t2.up()
    t2.goto(0, -2.5)
    t2.begin_fill()
    t2.circle(2.5)
    t2.end_fill()
    expected_report = t2.report
    MockTurtle._screen = None

    t = MockTurtle()
    t.dot()
    report = t.report

    assert report == expected_report
Exemplo n.º 2
0
def test_dot(patched_turtle):
    """ Draw dot with the rounded ends of a zero-length line. """
    expected_report = """\
create_line
    0
    0
    0
    0
    fill='black'
    pensize=5"""

    t = MockTurtle()
    t.dot()
    report = t.report

    assert report == expected_report.splitlines()
Exemplo n.º 3
0
    def test_dot(self):
        # SETUP
        t2 = MockTurtle()
        t2.up()
        t2.goto(0, -2.5)
        t2.begin_fill()
        t2.circle(2.5)
        t2.end_fill()
        expected_report = t2.report
        MockTurtle._screen = None

        # EXEC
        t = MockTurtle()
        t.dot()
        report = t.report

        # VERIFY
        self.assertEqual(expected_report, report)