Skip to content

Commit

Permalink
Make sure there are two identically named ensembles in storage
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeda committed Sep 2, 2024
1 parent 536dc28 commit 1b87480
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit_tests/gui/test_csv_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ def run_experiment_via_gui(gui, qtbot):
qtbot.mouseClick(run_dialog.done_button, Qt.LeftButton)


from ert.storage import open_storage


def test_that_export_tool_does_not_produce_duplicate_data(
ensemble_experiment_has_run_no_failure, qtbot
):
Expand All @@ -125,6 +128,14 @@ def test_that_export_tool_does_not_produce_duplicate_data(

df = pd.read_csv(file_name)

# Make sure there are two identically named ensembles in two
# different experiments.
with open_storage("storage") as storage:
experiments = [exp.name for exp in storage.experiments]
ensembles = [ens.name for ens in storage.ensembles]
assert experiments == ["ensemble_experiment_0", "ensemble_experiment"]
assert ensembles == ["iter-0", "iter-0"]

# Split the dataframe into two halves
half_point = len(df) // 2
first_half = df.iloc[:half_point]
Expand Down

0 comments on commit 1b87480

Please sign in to comment.