Skip to content
Snippets Groups Projects

[Tests] clearer comparison of HDF5 files

Merged Thomas Kluyver requested to merge test/compare-h5-files into master
1 file
+ 7
3
Compare changes
  • Side-by-side
  • Inline
@@ -85,9 +85,13 @@ def validate_file(
ref_ds = fref[dsname]
out_ds = fout[dsname]
if out_ds.shape != ref_ds.shape:
changed.append((dsname, f"Shape: {ref_ds.shape} -> {out_ds.shape}")) # noqa
changed.append((
dsname, f"Shape: {ref_ds.shape} -> {out_ds.shape}"
))
elif out_ds.dtype != ref_ds.dtype:
changed.append((dsname, f"Dtype: {ref_ds.dtype} -> {out_ds.dtype}")) # noqa
changed.append((
dsname, f"Dtype: {ref_ds.dtype} -> {out_ds.dtype}"
))
else:
floaty = np.issubdtype(ref_ds.dtype, np.floating) \
or np.issubdtype(ref_ds.dtype, np.complexfloating)
@@ -312,7 +316,7 @@ def test_xfel_calibrate(
)
)
report_name = out_folder / f"{test_key}_{datetime.now().strftime('%y%m%d_%H%M%S')}" # noqa
report_name = out_folder / f"{test_key}_{datetime.now():%y%m%d_%H%M%S}"
cal_conf["report-to"] = str(report_name)
Loading