Merge branch 'fix-DREAM3Dtest-Windows' into 'development'
use OS-independent separators See merge request damask/DAMASK!882
This commit is contained in:
commit
598b0b2386
|
@ -63,7 +63,7 @@ def h5py_dataset_iterator():
|
||||||
"""Iterate over all datasets in an HDF5 file."""
|
"""Iterate over all datasets in an HDF5 file."""
|
||||||
def _h5py_dataset_iterator(g, prefix=''):
|
def _h5py_dataset_iterator(g, prefix=''):
|
||||||
for key,item in g.items():
|
for key,item in g.items():
|
||||||
path = os.path.join(prefix, key)
|
path = '/'.join([prefix, key])
|
||||||
if isinstance(item, h5py.Dataset): # test for dataset
|
if isinstance(item, h5py.Dataset): # test for dataset
|
||||||
yield (path, item)
|
yield (path, item)
|
||||||
elif isinstance(item, h5py.Group): # test for group (go down)
|
elif isinstance(item, h5py.Group): # test for group (go down)
|
||||||
|
@ -472,7 +472,7 @@ class TestResult:
|
||||||
c = [_.decode() for _ in cur[path]]
|
c = [_.decode() for _ in cur[path]]
|
||||||
r = ['Unknown Phase Type'] + result.phases
|
r = ['Unknown Phase Type'] + result.phases
|
||||||
assert c == r
|
assert c == r
|
||||||
grp = os.path.split(path)[0]
|
grp = str(path).rpartition('/')[0]
|
||||||
for attr in ref[grp].attrs:
|
for attr in ref[grp].attrs:
|
||||||
assert np.array_equal(ref[grp].attrs[attr],cur[grp].attrs[attr])
|
assert np.array_equal(ref[grp].attrs[attr],cur[grp].attrs[attr])
|
||||||
for attr in dset.attrs:
|
for attr in dset.attrs:
|
||||||
|
|
Loading…
Reference in New Issue