MCPcopy Index your code
hub / github.com/python/cpython / test_backwards

Method test_backwards

Lib/test/test_turtle.py:347–356  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

345 self.assertRaises(TypeError, self.nav.forward, 'skldjfldsk')
346
347 def test_backwards(self):
348 self.nav.back(200)
349 expected = Vec2D(-200, 0)
350 self.assertVectorsAlmostEqual(self.nav.position(), expected)
351
352 self.nav.reset()
353 self.nav.right(90)
354 self.nav.back(200)
355 expected = Vec2D(0, 200)
356 self.assertVectorsAlmostEqual(self.nav.position(), expected)
357
358 def test_distance(self):
359 self.nav.forward(100)

Callers

nothing calls this directly

Calls 5

backMethod · 0.80
rightMethod · 0.80
Vec2DClass · 0.70
resetMethod · 0.45

Tested by

no test coverage detected