mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Updating h5py calls in the plot test files.
This commit is contained in:
parent
5b81083742
commit
1e2735df93
3 changed files with 13 additions and 13 deletions
|
|
@ -42,10 +42,10 @@ class PlotTestHarness(TestHarness):
|
|||
# Add voxel data to results
|
||||
with h5py.File(fname, 'r') as fh:
|
||||
outstr += fh.attrs['filetype']
|
||||
outstr += fh.attrs['num_voxels'].tostring()
|
||||
outstr += fh.attrs['lower_left'].tostring()
|
||||
outstr += fh.attrs['voxel_width'].tostring()
|
||||
outstr += fh['data'].value.tostring()
|
||||
outstr += fh.attrs['num_voxels'].tobytes()
|
||||
outstr += fh.attrs['lower_left'].tobytes()
|
||||
outstr += fh.attrs['voxel_width'].tobytes()
|
||||
outstr += fh['data'][()].tobytes()
|
||||
|
||||
# Hash the information and return.
|
||||
sha512 = hashlib.sha512()
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ class PlotTestHarness(TestHarness):
|
|||
# Add voxel data to results
|
||||
with h5py.File(fname, 'r') as fh:
|
||||
outstr += fh.attrs['filetype']
|
||||
outstr += fh.attrs['num_voxels'].tostring()
|
||||
outstr += fh.attrs['lower_left'].tostring()
|
||||
outstr += fh.attrs['voxel_width'].tostring()
|
||||
outstr += fh['data'].value.tostring()
|
||||
outstr += fh.attrs['num_voxels'].tobytes()
|
||||
outstr += fh.attrs['lower_left'].tobytes()
|
||||
outstr += fh.attrs['voxel_width'].tobytes()
|
||||
outstr += fh['data'][()].tobytes()
|
||||
|
||||
# Hash the information and return.
|
||||
sha512 = hashlib.sha512()
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class PlotVoxelTestHarness(TestHarness):
|
|||
|
||||
check_call(['../../../scripts/openmc-voxel-to-vtk'] +
|
||||
glob.glob('plot_4.h5'))
|
||||
|
||||
|
||||
def _test_output_created(self):
|
||||
"""Make sure *.ppm has been created."""
|
||||
for fname in self._plot_names:
|
||||
|
|
@ -44,10 +44,10 @@ class PlotVoxelTestHarness(TestHarness):
|
|||
# Add voxel data to results
|
||||
with h5py.File(fname, 'r') as fh:
|
||||
outstr += fh.attrs['filetype']
|
||||
outstr += fh.attrs['num_voxels'].tostring()
|
||||
outstr += fh.attrs['lower_left'].tostring()
|
||||
outstr += fh.attrs['voxel_width'].tostring()
|
||||
outstr += fh['data'].value.tostring()
|
||||
outstr += fh.attrs['num_voxels'].tobytes()
|
||||
outstr += fh.attrs['lower_left'].tobytes()
|
||||
outstr += fh.attrs['voxel_width'].tobytes()
|
||||
outstr += fh['data'][()].tobytes()
|
||||
|
||||
# Hash the information and return.
|
||||
sha512 = hashlib.sha512()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue