parent
af5bbed003
commit
0c56711032
|
@ -63,7 +63,7 @@ def h5py_dataset_iterator():
|
|||
"""Iterate over all datasets in an HDF5 file."""
|
||||
def _h5py_dataset_iterator(g, prefix=''):
|
||||
for key,item in g.items():
|
||||
path = os.path.join(prefix, key)
|
||||
path = '/'.join([prefix, key])
|
||||
if isinstance(item, h5py.Dataset): # test for dataset
|
||||
yield (path, item)
|
||||
elif isinstance(item, h5py.Group): # test for group (go down)
|
||||
|
@ -472,7 +472,7 @@ class TestResult:
|
|||
c = [_.decode() for _ in cur[path]]
|
||||
r = ['Unknown Phase Type'] + result.phases
|
||||
assert c == r
|
||||
grp = os.path.split(path)[0]
|
||||
grp = str(path).rpartition('/')[0]
|
||||
for attr in ref[grp].attrs:
|
||||
assert np.array_equal(ref[grp].attrs[attr],cur[grp].attrs[attr])
|
||||
for attr in dset.attrs:
|
||||
|
|
Loading…
Reference in New Issue