def test_penup(self): # SETUP expected_report = """\ create_line 0 0 100 0 fill='black' pensize=1 create_line 150 0 350 0 fill='#000000' pensize=1 """ # EXEC t = MockTurtle() t.fd(100) t.penup() t.fd(50) t.pendown() t.fd(200) report = t.report # VERIFY self.assertEqual(expected_report.splitlines(), report)
def test_penup(patched_turtle): expected_report = """\ create_line 0 0 100 0 fill='black' pensize=1 create_line 150 0 350 0 fill='#000000' pensize=1 """ t = MockTurtle() t.fd(100) t.penup() t.fd(50) t.pendown() t.fd(200) report = t.report assert report == expected_report.splitlines()