Skip to content

Commit be01680

Browse files
committed
Add utf-8 encoding in test_setupcfg, test_expand
1 parent d1019e1 commit be01680

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

setuptools/tests/config/test_expand.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def write_files(files, root_dir):
1212
for file, content in files.items():
1313
path = root_dir / file
1414
path.parent.mkdir(exist_ok=True, parents=True)
15-
path.write_text(content)
15+
path.write_text(content, encoding="utf-8")
1616

1717

1818
def test_glob_relative(tmp_path, monkeypatch):

setuptools/tests/config/test_setupcfg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,8 @@ def test_cmdclass(self, tmpdir):
904904
module_path = Path(tmpdir, "src/custom_build.py") # auto discovery for src
905905
module_path.parent.mkdir(parents=True, exist_ok=True)
906906
module_path.write_text(
907-
"from distutils.core import Command\n" "class CustomCmd(Command): pass\n"
907+
"from distutils.core import Command\n" "class CustomCmd(Command): pass\n",
908+
encoding="utf-8",
908909
)
909910

910911
setup_cfg = """

0 commit comments

Comments
 (0)