From b6e49b59a7ca484e95d70b855c4caff405c05eb1 Mon Sep 17 00:00:00 2001 From: MirceaDan Date: Sat, 1 Dec 2018 17:11:07 -0800 Subject: [PATCH] unitest update to decode utf8 TypeError: write() argument 1 must be unicode, not str --- tests/util/test_file_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/test_file_helpers.py b/tests/util/test_file_helpers.py index d2576c012..8c25d12d3 100644 --- a/tests/util/test_file_helpers.py +++ b/tests/util/test_file_helpers.py @@ -337,7 +337,7 @@ class IsHiddenPathTest(unittest.TestCase): for attr in ("path_always_visible", "path_hidden_on_windows", "path_always_hidden"): path = getattr(self, attr) with io.open(path, 'wt+', encoding='utf-8') as f: - f.write(attr) + f.write(attr.decode('utf-8')) if sys.platform == "win32": # we use ctypes and the windows API to set the hidden attribute on the file