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

Method test_view_file

Lib/idlelib/idle_test/test_textview.py:163–169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

161 view.viewframe.ok()
162
163 def test_view_file(self):
164 view = tv.view_file(root, 'Title', __file__, 'ascii', modal=False)
165 self.assertIsInstance(view, tv.ViewWindow)
166 self.assertIsInstance(view.viewframe, tv.ViewFrame)
167 get = view.viewframe.textframe.text.get
168 self.assertIn('Test', get('1.0', '1.end'))
169 view.ok()
170
171 def test_bad_file(self):
172 # Mock showerror will be used; view_file will return None.

Callers

nothing calls this directly

Calls 4

assertIsInstanceMethod · 0.80
assertInMethod · 0.80
getFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected