Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure tests run in clean directory #9379

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/ert/unit_tests/config/test_ert_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ def test_fm_step_config_via_plugin_ends_up_json_data(monkeypatch):
assert step_json["jobList"][0]["environment"]["FOO"] == "bar"


@pytest.mark.usefixtures("use_tmpdir")
def test_fm_step_config_via_plugin_does_not_leak_to_other_step(monkeypatch):
monkeypatch.setattr(
ErtPluginManager,
Expand Down Expand Up @@ -887,6 +888,7 @@ def test_fm_step_config_via_plugin_does_not_leak_to_other_step(monkeypatch):
assert "FOO" not in step_json["jobList"][0]["environment"]


@pytest.mark.usefixtures("use_tmpdir")
def test_fm_step_config_via_plugin_has_key_names_uppercased(monkeypatch):
monkeypatch.setattr(
ErtPluginManager,
Expand Down Expand Up @@ -914,6 +916,7 @@ def test_fm_step_config_via_plugin_has_key_names_uppercased(monkeypatch):
assert step_json["jobList"][0]["environment"]["FOO"] == "bar"


@pytest.mark.usefixtures("use_tmpdir")
def test_fm_step_config_via_plugin_stringifies_python_objects(monkeypatch):
monkeypatch.setattr(
ErtPluginManager,
Expand Down Expand Up @@ -941,6 +944,7 @@ def test_fm_step_config_via_plugin_stringifies_python_objects(monkeypatch):
assert step_json["jobList"][0]["environment"]["FOO"] == "{'a_dict_as_value': 1}"


@pytest.mark.usefixtures("use_tmpdir")
def test_fm_step_config_via_plugin_ignores_conflict_with_setenv(monkeypatch):
monkeypatch.setattr(
ErtPluginManager,
Expand Down Expand Up @@ -973,6 +977,7 @@ def test_fm_step_config_via_plugin_ignores_conflict_with_setenv(monkeypatch):
# It is up to forward_model_runner to define behaviour here


@pytest.mark.usefixtures("use_tmpdir")
def test_fm_step_config_via_plugin_does_not_override_default_env(monkeypatch):
monkeypatch.setattr(
ErtPluginManager,
Expand Down Expand Up @@ -1003,6 +1008,7 @@ def test_fm_step_config_via_plugin_does_not_override_default_env(monkeypatch):
)


@pytest.mark.usefixtures("use_tmpdir")
def test_fm_step_config_via_plugin_is_substituted_for_defines(monkeypatch):
monkeypatch.setattr(
ErtPluginManager,
Expand Down Expand Up @@ -1031,6 +1037,7 @@ def test_fm_step_config_via_plugin_is_substituted_for_defines(monkeypatch):
assert step_json["jobList"][0]["environment"]["FOO"] == "define_works"


@pytest.mark.usefixtures("use_tmpdir")
def test_fm_step_config_via_plugin_is_dropped_if_not_define_exists(monkeypatch):
monkeypatch.setattr(
ErtPluginManager,
Expand Down