Skip to content

Commit d616c78

Browse files
Fix a test
1 parent 658314e commit d616c78

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

tests/unit_tests/experiment/test_experiment.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,26 +119,13 @@ def test_save_hdf5(self, tmp_path, experiment):
119119
original_data = experiment.data
120120
assert sc.identical(original_data, loaded_data)
121121

122-
def test_save_hdf5_default_name(self, tmp_path, experiment):
123-
"Test saving data to an HDF5 file with default filename (based on experiment name). Load the saved file using scipp and compare to the original data."
124-
# WHEN THEN
125-
current_dir = tmp_path
126-
experiment.name = "default_name_experiment"
127-
expected_filename = current_dir / "default_name_experiment.h5"
128-
experiment.save_hdf5()
129-
130-
# EXPECT
131-
loaded_data = sc.io.load_hdf5(str(expected_filename))
132-
original_data = experiment.data
133-
assert sc.identical(original_data, loaded_data)
134-
135122
def test_save_hdf5_no_data_raises(self):
136123
"Test saving data to an HDF5 file when no data is present in the experiment"
137124
# WHEN
138125
experiment = Experiment(name="no_data_experiment")
139126

140127
# THEN EXPECT
141-
with pytest.raises(AttributeError):
128+
with pytest.raises(ValueError):
142129
experiment.save_hdf5("should_fail.h5")
143130

144131
def test_save_hdf5_invalid_filename_raises(self, experiment):

0 commit comments

Comments
 (0)