MCPcopy Create free account
hub / github.com/ipython/ipython / test_source_to_unicode

Function test_source_to_unicode

IPython/utils/tests/test_openpy.py:30–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29
30def test_source_to_unicode():
31 with io.open(nonascii_path, "rb") as f:
32 source_bytes = f.read()
33 nt.assert_equal(
34 openpy.source_to_unicode(source_bytes, skip_encoding_cookie=False).splitlines(),
35 source_bytes.decode("iso-8859-5").splitlines(),
36 )
37
38 source_no_cookie = openpy.source_to_unicode(source_bytes, skip_encoding_cookie=True)
39 nt.assert_not_in("coding: iso-8859-5", source_no_cookie)

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected