Use utf-8 debug file
This commit is contained in:
parent
661b938fca
commit
f6b995e9d5
|
@ -0,0 +1 @@
|
|||
Fix writing non-encodable text to log file when using ``--debug``.
|
|
@ -105,7 +105,7 @@ def pytest_cmdline_parse():
|
|||
if config.option.debug:
|
||||
# --debug | --debug <file.log> was provided.
|
||||
path = config.option.debug
|
||||
debugfile = open(path, "w")
|
||||
debugfile = open(path, "w", encoding="utf-8")
|
||||
debugfile.write(
|
||||
"versions pytest-%s, "
|
||||
"python-%s\ncwd=%s\nargs=%s\n\n"
|
||||
|
|
Loading…
Reference in New Issue