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

Method test_bad_encoding

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

Source from the content-addressed store, hash-verified

175 self.assertEqual(tv.showerror.title, 'File Load Error')
176
177 def test_bad_encoding(self):
178 p = os.path
179 fn = p.abspath(p.join(p.dirname(__file__), '..', 'CREDITS.txt'))
180 view = tv.view_file(root, 'Title', fn, 'ascii', modal=False)
181 self.assertIsNone(view)
182 self.assertEqual(tv.showerror.title, 'Unicode Decode Error')
183
184 def test_nowrap(self):
185 view = tv.view_text(root, 'Title', 'test', modal=False, wrap='none')

Callers

nothing calls this directly

Calls 5

assertIsNoneMethod · 0.80
abspathMethod · 0.45
joinMethod · 0.45
dirnameMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected