MCPcopy
hub / github.com/cherrypy/cherrypy / _check_unicode_filesystem

Function _check_unicode_filesystem

cherrypy/test/test_static.py:27–34  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

25
26
27def _check_unicode_filesystem(tmpdir):
28 filename = tmpdir / ntou('☃', 'utf-8')
29 tmpl = 'File system encoding ({encoding}) cannot support unicode filenames'
30 msg = tmpl.format(encoding=sys.getfilesystemencoding())
31 try:
32 io.open(str(filename), 'w').close()
33 except UnicodeEncodeError:
34 pytest.skip(msg)
35
36
37def ensure_unicode_filesystem():

Callers 2

unicode_filesystemFunction · 0.85

Calls 4

ntouFunction · 0.90
formatMethod · 0.80
skipMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…