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

Method test_poly_resets_after_exception

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

Source from the content-addressed store, hash-verified

632 self.assertFalse(self.turtle._creatingPoly)
633
634 def test_poly_resets_after_exception(self):
635 # The context manager cleans up correctly after exceptions.
636 try:
637 with self.turtle.poly():
638 self.assertTrue(self.turtle._creatingPoly)
639 raise ValueError
640 except ValueError:
641 self.assertFalse(self.turtle._creatingPoly)
642
643 def test_poly_context_when_creating_poly(self):
644 # The context manager works when the turtle is already creating poly.

Callers

nothing calls this directly

Calls 3

polyMethod · 0.80
assertTrueMethod · 0.80
assertFalseMethod · 0.80

Tested by

no test coverage detected