Skip to content

Commit a3b7a4a

Browse files
committed
Fix failing test cases
1 parent b4290e0 commit a3b7a4a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

imas/test/test_lazy_loading.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,12 @@ def test_lazy_load_with_new_structure(requires_imas):
224224
eq.time_slice.resize(1)
225225
dbentry.put(eq)
226226

227-
entry2 = DBEntry(MEMORY_BACKEND, "ITER", 1, 1, data_version="3", dd_version="4.0.0")
227+
entry2 = DBEntry(
228+
MEMORY_BACKEND, "ITER", 1, 1, data_version="3", dd_version="3.39.0"
229+
)
228230
entry2.open()
229231
lazy_eq = entry2.get("equilibrium", lazy=True)
230-
assert not lazy_eq.time_slice[0].boundary.dr_dz_zero_point.r.has_value
232+
assert not lazy_eq.time_slice[0].boundary_separatrix.dr_dz_zero_point.r.has_value
231233

232234

233235
def test_lazy_load_multiple_ids(backend, worker_id, tmp_path):

imas/training.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def get_training_db_entry() -> imas.DBEntry:
1919

2020
output_entry = imas.DBEntry("imas:memory?path=/", "w")
2121
for ids_name in ["core_profiles", "equilibrium"]:
22-
ids = entry.get(ids_name)
22+
ids = entry.get(ids_name, autoconvert=False)
2323
with patch.dict("os.environ", {"IMAS_AL_DISABLE_VALIDATE": "1"}):
24-
output_entry.put(ids)
24+
output_entry.put(imas.convert_ids(ids, output_entry.dd_version))
2525
entry.close()
2626
return output_entry

0 commit comments

Comments
 (0)