Skip to content

Commit

Permalink
fix UnicodeEncodeError occured when reports generated with special ch…
Browse files Browse the repository at this point in the history
…ars (#90)

Co-authored-by: shreyas4111 <spatwardhan@eb.com>
  • Loading branch information
trialhub123 and shreyas4111 authored Aug 22, 2024
1 parent a45d424 commit 8529dc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HtmlTestRunner/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def generate_file(self, testRunner, report_name, report):
path_file = os.path.abspath(os.path.join(dir_to, report_name))
self.stream.writeln(os.path.relpath(path_file))
self.report_files.append(path_file)
with open(path_file, 'w') as report_file:
with open(path_file, 'w', encoding='utf-8') as report_file:
report_file.write(report)

def _exc_info_to_string(self, err, test):
Expand Down

0 comments on commit 8529dc3

Please sign in to comment.