Skip to content

Commit

Permalink
Set ensemble name of single test run to "ensemble"
Browse files Browse the repository at this point in the history
No reason to use date as name.
Makes writing tests easier.
  • Loading branch information
dafeda authored Aug 30, 2024
1 parent e68b3be commit f0fb2aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/ert/gui/simulation/single_test_run_panel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from dataclasses import dataclass
from datetime import datetime

from qtpy import QtCore
from qtpy.QtWidgets import QFormLayout, QLabel
Expand Down Expand Up @@ -37,5 +36,4 @@ def __init__(self, run_path: str, notifier: ErtNotifier):
self.setLayout(layout)

def get_experiment_arguments(self) -> Arguments:
ensemble_name = f"{datetime.now().strftime('%Y-%m-%dT%H%M')}"
return Arguments(TEST_RUN_MODE, ensemble_name, "single_test_run")
return Arguments(TEST_RUN_MODE, "ensemble", "single_test_run")
6 changes: 4 additions & 2 deletions tests/unit_tests/gui/test_single_test_run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import contextlib
import shutil
from datetime import datetime

from qtpy.QtCore import Qt
from qtpy.QtWidgets import (
Expand Down Expand Up @@ -38,4 +37,7 @@ def test_single_test_run_after_ensemble_experiment(

storage = gui.notifier.storage
assert "single_test_run" in [exp.name for exp in storage.experiments]
assert any(str(datetime.now().year) in ens.name for ens in storage.ensembles)
ensemble_names = [ens.name for ens in storage.ensembles]
assert "iter-0" in ensemble_names
# Default ensemble name when running single test run
assert "ensemble" in ensemble_names

0 comments on commit f0fb2aa

Please sign in to comment.