unitest update to decode utf8
TypeError: write() argument 1 must be unicode, not str
This commit is contained in:
1 parent
347f53baa4
commit
b6e49b59a7
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user