Skip to content

Commit 9e0a888

Browse files
committed
Add utf-8 encoding in test_editable_install test_logging
1 parent e658599 commit 9e0a888

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

setuptools/tests/test_editable_install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ def test_editable_with_pyproject(tmp_path, venv, files, editable_opts):
144144
cmd = [venv.exe(), "-m", "mypkg"]
145145
assert subprocess.check_output(cmd).strip() == b"3.14159.post0 Hello World"
146146

147-
(project / "src/mypkg/data.txt").write_text("foobar")
148-
(project / "src/mypkg/mod.py").write_text("x = 42")
147+
(project / "src/mypkg/data.txt").write_text("foobar", encoding="utf-8")
148+
(project / "src/mypkg/mod.py").write_text("x = 42", encoding="utf-8")
149149
assert subprocess.check_output(cmd).strip() == b"3.14159.post0 foobar 42"
150150

151151

setuptools/tests/test_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_verbosity_level(tmp_path, monkeypatch, flag, expected_level):
3333
assert logging.getLevelName(unset_log_level) == "NOTSET"
3434

3535
setup_script = tmp_path / "setup.py"
36-
setup_script.write_text(setup_py)
36+
setup_script.write_text(setup_py, encoding="utf-8")
3737
dist = distutils.core.run_setup(setup_script, stop_after="init")
3838
dist.script_args = [flag, "sdist"]
3939
dist.parse_command_line() # <- where the log level is set

0 commit comments

Comments
 (0)