From 19fc8ae86db7818376f5a9d11359c5f69e8dd747 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Nov 2018 02:26:21 -0600 Subject: Fix test failures on pytest 4 --- cherrypy/test/test_static.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() -- cgit v1.2.1