From b00a2ac26d57b0c2d8fe124bcab65cfe7ef50b6f Mon Sep 17 00:00:00 2001 From: Christian Sandberg Date: Thu, 22 Jul 2021 11:47:42 +0200 Subject: [PATCH] Save reports as UTF-8 --- pytest_reporter/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_reporter/plugin.py b/pytest_reporter/plugin.py index 2d01e09..145b803 100644 --- a/pytest_reporter/plugin.py +++ b/pytest_reporter/plugin.py @@ -197,7 +197,7 @@ def pytest_reporter_save(self, config): # Save content to file target = Path(path) target.parent.mkdir(parents=True, exist_ok=True) - target.write_text(content) + target.write_text(content, "utf-8") config.hook.pytest_reporter_finish( path=target, context=self.context, config=config )