Skip to content

Commit

Permalink
Remove not needed plugin context
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Jul 23, 2024
1 parent dadc81b commit 482489d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
16 changes: 3 additions & 13 deletions tests/forward_models/nosim/test_nosim.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
import subprocess
import sys

import ert.shared.hook_implementations
import pytest
from ert.shared.plugins.plugin_manager import ErtPluginContext

import semeio.hook_implementations.forward_models


@pytest.mark.skipif(
Expand Down Expand Up @@ -71,14 +67,8 @@ def test_nosim(nosim_command, data_input, data_expected):
with open("TEST.DATA", "w", encoding="utf-8") as file:
file.write(data_input)

with ErtPluginContext(
plugins=[
semeio.hook_implementations.forward_models,
ert.shared.hook_implementations,
]
):
subprocess.check_call(
["ert", "test_run", "nosim.ert", "--verbose"],
)
subprocess.check_call(
["ert", "test_run", "nosim.ert", "--verbose"],
)
with open("nosim/realization-0/iter-0/TEST.DATA", encoding="utf-8") as file:
assert file.read() == data_expected
9 changes: 0 additions & 9 deletions tests/test_ert_integration.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import subprocess

import ert.shared.hook_implementations
import pytest
from ert.shared.plugins.plugin_manager import ErtPluginContext

import semeio.hook_implementations.forward_models

DEFAULT_CONFIG = """
JOBNAME TEST
Expand Down Expand Up @@ -71,11 +67,6 @@ def test_forward_model_error_propagation(forward_model, configuration, expected_
with pytest.raises(
subprocess.CalledProcessError,
match=r"Command.*ert.*returned non-zero exit status",
), ErtPluginContext(
plugins=[
semeio.hook_implementations.forward_models,
ert.shared.hook_implementations,
]
):
subprocess.run(["ert", "test_run", "config.ert", "--verbose"], check=True)
with open(
Expand Down

0 comments on commit 482489d

Please sign in to comment.