From 63d0188f5394c4e39fffb8b8ad78b795a5ba0c1a Mon Sep 17 00:00:00 2001 From: James Williams Date: Thu, 29 Dec 2022 16:03:24 -0600 Subject: [PATCH] Update encoding in pytest.py. --- .vscode/settings.json | 5 +++++ src/tox/pytest.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..d969f962b0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "python.testing.pytestArgs": ["tests"], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} diff --git a/src/tox/pytest.py b/src/tox/pytest.py index 21cd816adf..ae21125255 100644 --- a/src/tox/pytest.py +++ b/src/tox/pytest.py @@ -161,7 +161,7 @@ def _setup_files(dest: Path, base: Path | None, content: dict[str, Any]) -> None at_path.mkdir(exist_ok=True) ToxProject._setup_files(at_path, None, value) elif isinstance(value, str): - at_path.write_text(textwrap.dedent(value)) + at_path.write_text(textwrap.dedent(value), encoding="utf-8") elif value is None: at_path.mkdir() else: