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

Method test_paren_corner

Lib/idlelib/idle_test/test_parenmatch.py:82–99  ·  view source on GitHub ↗

Test corner cases in flash_paren_event and paren_closed_event. Force execution of conditional expressions and alternate paths.

(self)

Source from the content-addressed store, hash-verified

80 text.tag_prevrange('paren', 'end'), range2)
81
82 def test_paren_corner(self):
83 """
84 Test corner cases in flash_paren_event and paren_closed_event.
85
86 Force execution of conditional expressions and alternate paths.
87 """
88 text = self.text
89 pm = self.get_parenmatch()
90
91 text.insert('insert', '# Comment.)')
92 pm.paren_closed_event('event')
93
94 text.insert('insert', '\ndef')
95 pm.flash_paren_event('event')
96 pm.paren_closed_event('event')
97
98 text.insert('insert', ' a, *arg)')
99 pm.paren_closed_event('event')
100
101 def test_handle_restore_timer(self):
102 pm = self.get_parenmatch()

Callers

nothing calls this directly

Calls 4

get_parenmatchMethod · 0.95
paren_closed_eventMethod · 0.80
flash_paren_eventMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected