@@ -44,8 +44,9 @@ def test_apply_pyproject_equivalent_to_setupcfg(url, monkeypatch, tmp_path):
44
44
monkeypatch .setattr (expand , "read_attr" , Mock (return_value = "0.0.1" ))
45
45
setupcfg_example = retrieve_file (url )
46
46
pyproject_example = Path (tmp_path , "pyproject.toml" )
47
- toml_config = Translator ().translate (setupcfg_example .read_text (), "setup.cfg" )
48
- pyproject_example .write_text (toml_config )
47
+ setupcfg_text = setupcfg_example .read_text (encoding = "utf-8" )
48
+ toml_config = Translator ().translate (setupcfg_text , "setup.cfg" )
49
+ pyproject_example .write_text (toml_config , encoding = "utf-8" )
49
50
50
51
dist_toml = pyprojecttoml .apply_configuration (makedist (tmp_path ), pyproject_example )
51
52
dist_cfg = setupcfg .apply_configuration (makedist (tmp_path ), setupcfg_example )
@@ -177,9 +178,9 @@ def _pep621_example_project(
177
178
text = text .replace (orig , subst )
178
179
pyproject .write_text (text , encoding = "utf-8" )
179
180
180
- (tmp_path / readme ).write_text ("hello world" )
181
- (tmp_path / "LICENSE.txt" ).write_text ("--- LICENSE stub ---" )
182
- (tmp_path / "spam.py" ).write_text (PEP621_EXAMPLE_SCRIPT )
181
+ (tmp_path / readme ).write_text ("hello world" , encoding = "utf-8" )
182
+ (tmp_path / "LICENSE.txt" ).write_text ("--- LICENSE stub ---" , encoding = "utf-8" )
183
+ (tmp_path / "spam.py" ).write_text (PEP621_EXAMPLE_SCRIPT , encoding = "utf-8" )
183
184
return pyproject
184
185
185
186
0 commit comments