You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make it do exactly the same, but using the seba db from the shared case. Should be set up similar to the way we have a shared case for snake oil in some ERT tests.
Definition of done: Remove all use of mock_SebaSnapshot in test_api.py, it should instead get the seba snapshot from the seba db in the shared case.
Possible starting point:
@pytest.fixture
def _shared_multiobj_case(request, monkeypatch):
"""This fixture will run the multiobj case to populate storage,
this is quite slow, but the results will be cached. If something comes
out of sync, clear the cache and start again.
"""
test_data_path = Path(
relpath("..", "..", "test-data", "everest", "math_func")
).resolve()
output_path = request.config.cache.mkdir(
"multiobj_data" + os.environ.get("PYTEST_XDIST_WORKER", "")
)
if not os.path.exists(output_path / "test_data"):
os.mkdir("test_data")
shutil.copy(test_data_path / "config_multiobj.yml", "./test_data/config_multiobj.yml")
shutil.copytree(test_data_path / "jobs", "./test_data/jobs")
sys.argv = ["run", "--new-run", "./test_data/config_multiobj.yml"]
from everest.bin.everest_script import everest_entry
everest_entry()
monkeypatch.chdir(output_path / "test_data")
yield output_path / "test_data"
@pytest.fixture(
name="copy_multiobj_case",
params=[
pytest.param(0, marks=pytest.mark.xdist_group(name="snake_oil_case_storage"))
],
)
def fixture_multiobj_case(_shared_multiobj_case, tmp_path, monkeypatch):
monkeypatch.chdir(tmp_path)
shutil.copytree(_shared_multiobj_case, "test_data")
monkeypatch.chdir("test_data")
The text was updated successfully, but these errors were encountered:
Make it do exactly the same, but using the seba db from the shared case. Should be set up similar to the way we have a shared case for snake oil in some ERT tests.
Definition of done: Remove all use of
mock_SebaSnapshot
intest_api.py
, it should instead get the seba snapshot from the seba db in the shared case.Possible starting point:
The text was updated successfully, but these errors were encountered: