Skip to content

Commit e154d76

Browse files
committed
Add unitest
1 parent 68b45f3 commit e154d76

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/plate_simulation/runtest/sweep_test.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
# (see LICENSE file at the root of this source code package). '
88
# '
99
# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
10-
10+
from io import BytesIO
1111

1212
from geoh5py import Workspace
1313
from geoh5py.groups import SimPEGGroup
1414
from geoh5py.ui_json import InputFile
15+
from pandas import read_excel
1516

1617
from simpeg_drivers import assets_path
1718
from simpeg_drivers.plate_simulation.options import PlateSimulationOptions
@@ -103,3 +104,11 @@ def test_sweep(tmp_path):
103104

104105
n = len(list(workdir.glob("*.geoh5")))
105106
assert n == 6
107+
108+
# Check that the summary file was created and has the expected number of rows
109+
with Workspace(tmp_path / "test.geoh5") as ws:
110+
file_data = ws.get_entity("summary.xlsx")[0]
111+
blob = BytesIO(file_data.file_bytes)
112+
xls = read_excel(blob)
113+
114+
assert len(xls) == 6

0 commit comments

Comments
 (0)