diff options
-rw-r--r-- | cherrypy/test/test_static.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cherrypy/test/test_static.py b/cherrypy/test/test_static.py index 5dc5a144..52f4006f 100644 --- a/cherrypy/test/test_static.py +++ b/cherrypy/test/test_static.py @@ -21,6 +21,10 @@ from cherrypy.test import helper @pytest.fixture def unicode_filesystem(tmpdir): + _check_unicode_filesystem(tmpdir) + + +def _check_unicode_filesystem(tmpdir): filename = tmpdir / ntou('☃', 'utf-8') tmpl = 'File system encoding ({encoding}) cannot support unicode filenames' msg = tmpl.format(encoding=sys.getfilesystemencoding()) @@ -37,7 +41,7 @@ def ensure_unicode_filesystem(): """ tmpdir = py.path.local(tempfile.mkdtemp()) try: - unicode_filesystem(tmpdir) + _check_unicode_filesystem(tmpdir) finally: tmpdir.remove() |