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

Function test_unicode_in_filename

IPython/utils/tests/test_path.py:319–329  ·  view source on GitHub ↗

When a file doesn't exist, the exception raised should be safe to call str() on - i.e. in Python 2 it must only have ASCII characters. https://github.com/ipython/ipython/issues/875

()

Source from the content-addressed store, hash-verified

317
318@onlyif_unicode_paths
319def test_unicode_in_filename():
320 """When a file doesn't exist, the exception raised should be safe to call
321 str() on - i.e. in Python 2 it must only have ASCII characters.
322
323 https://github.com/ipython/ipython/issues/875
324 """
325 try:
326 # these calls should not throw unicode encode exceptions
327 path.get_py_filename('fooéè.py')
328 except IOError as ex:
329 str(ex)
330
331
332class TestShellGlob(unittest.TestCase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected