Skip to content

Commit 7960647

Browse files
committed
update conftest and test_cmoriser_integration for om2 mock config
1 parent a4f53c8 commit 7960647

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

tests/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ def mock_config():
9090
}
9191

9292

93+
@pytest.fixture
94+
def mock_config_om2():
95+
"""Standard configuration for testing."""
96+
return {
97+
"experiment_id": "historical",
98+
"source_id": "ACCESS-OM2",
99+
"variant_label": "r1i1p1f1",
100+
"grid_label": "gn",
101+
"activity_id": "CMIP",
102+
}
103+
104+
93105
@pytest.fixture
94106
def batch_config():
95107
"""Sample batch configuration for testing."""

tests/integration/test_cmoriser_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_multiple_variables_workflow(
100100

101101
@patch("access_moppy.base.xr.open_mfdataset")
102102
def test_multiple_ocean_variables_workflow(
103-
self, mock_open_mfdataset, mock_config, temp_dir
103+
self, mock_open_mfdataset, mock_config_om2, temp_dir
104104
):
105105
"""Test workflow with multiple variables in dataset."""
106106
# Create dataset with multiple variables
@@ -115,7 +115,7 @@ def test_multiple_ocean_variables_workflow(
115115
input_paths=["mock_file.nc"],
116116
compound_name=compound_name,
117117
output_path=temp_dir,
118-
**mock_config,
118+
**mock_config_om2,
119119
)
120120

121121
with patch.object(cmoriser, "write"):

0 commit comments

Comments
 (0)