tests: fix a few open(...) calls (#48113)
This commit is contained in:
parent
af6526bb82
commit
107e4515bd
@ -119,7 +119,7 @@ def test_bad_command_line_scopes(tmp_path, config):
|
|||||||
|
|
||||||
def test_add_command_line_scopes(tmpdir, mutable_config):
|
def test_add_command_line_scopes(tmpdir, mutable_config):
|
||||||
config_yaml = str(tmpdir.join("config.yaml"))
|
config_yaml = str(tmpdir.join("config.yaml"))
|
||||||
with open(config_yaml, "w") as f:
|
with open(config_yaml, "w", encoding="utf-8") as f:
|
||||||
f.write(
|
f.write(
|
||||||
"""\
|
"""\
|
||||||
config:
|
config:
|
||||||
@ -137,7 +137,7 @@ def test_add_command_line_scope_env(tmp_path, mutable_mock_env_path):
|
|||||||
"""Test whether --config-scope <env> works, either by name or path."""
|
"""Test whether --config-scope <env> works, either by name or path."""
|
||||||
managed_env = ev.create("example").manifest_path
|
managed_env = ev.create("example").manifest_path
|
||||||
|
|
||||||
with open(managed_env, "w") as f:
|
with open(managed_env, "w", encoding="utf-8") as f:
|
||||||
f.write(
|
f.write(
|
||||||
"""\
|
"""\
|
||||||
spack:
|
spack:
|
||||||
@ -147,7 +147,7 @@ def test_add_command_line_scope_env(tmp_path, mutable_mock_env_path):
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(tmp_path / "spack.yaml", "w") as f:
|
with open(tmp_path / "spack.yaml", "w", encoding="utf-8") as f:
|
||||||
f.write(
|
f.write(
|
||||||
"""\
|
"""\
|
||||||
spack:
|
spack:
|
||||||
|
Loading…
Reference in New Issue
Block a user