diff --git a/IPython/testing/decorators.py b/IPython/testing/decorators.py index 2faeb33..6a12182 100644 --- a/IPython/testing/decorators.py +++ b/IPython/testing/decorators.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Decorators for labeling test objects. Decorators that merely return a modified version of the original function @@ -323,11 +324,12 @@ null_deco = lambda f: f # Some tests only run where we can use unicode paths. Note that we can't just # check os.path.supports_unicode_filenames, which is always False on Linux. try: - tempfile.mkdtemp(u"€") + f = tempfile.NamedTemporaryFile(prefix=u"tmp€") except UnicodeEncodeError: unicode_paths = False else: unicode_paths = True + f.close() onlyif_unicode_paths = onlyif(unicode_paths, ("This test is only applicable " "where we can use unicode in filenames."))