Skip to content

Commit 963c407

Browse files
committed
marking path a raw path to prevent unicodedecode error on windows (C:\Users)
1 parent ccaab64 commit 963c407

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_libzim_creator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def get_creator_output(fpath, verbose):
151151
"""run creator with configVerbose(verbose) and return its stdout as str"""
152152
code = """
153153
from libzim.writer import Creator
154-
with Creator("{fpath}").config_verbose({verbose}) as creator:
154+
with Creator(r"{fpath}").config_verbose({verbose}) as creator:
155155
pass
156156
""".replace(
157157
"{fpath}", str(fpath)
@@ -162,7 +162,7 @@ def get_creator_output(fpath, verbose):
162162
[sys.executable, "-c", code],
163163
stdout=subprocess.PIPE,
164164
stderr=subprocess.STDOUT,
165-
universal_newlines=True,
165+
text=True,
166166
)
167167
assert ps.returncode == 0
168168
return ps.stdout

0 commit comments

Comments
 (0)