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

Method test_teleport

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

Source from the content-addressed store, hash-verified

301 self.assertAlmostEqual(self.nav.ycor(), -100)
302
303 def test_teleport(self):
304 self.nav.teleport(20, -30, fill_gap=True)
305 self.assertAlmostEqual(self.nav.xcor(), 20)
306 self.assertAlmostEqual(self.nav.ycor(), -30)
307 self.nav.teleport(-20, 30, fill_gap=False)
308 self.assertAlmostEqual(self.nav.xcor(), -20)
309 self.assertAlmostEqual(self.nav.ycor(), 30)
310
311 def test_pos(self):
312 self.assertEqual(self.nav.pos(), self.nav._position)

Callers

nothing calls this directly

Calls 4

xcorMethod · 0.80
ycorMethod · 0.80
teleportMethod · 0.45
assertAlmostEqualMethod · 0.45

Tested by

no test coverage detected