diff --git a/tests/regression_tests/plot/test.py b/tests/regression_tests/plot/test.py index bfaef019c1..a6f7306a0e 100644 --- a/tests/regression_tests/plot/test.py +++ b/tests/regression_tests/plot/test.py @@ -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() diff --git a/tests/regression_tests/plot_overlaps/test.py b/tests/regression_tests/plot_overlaps/test.py index d8c0943cf5..62236081b3 100644 --- a/tests/regression_tests/plot_overlaps/test.py +++ b/tests/regression_tests/plot_overlaps/test.py @@ -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() diff --git a/tests/regression_tests/plot_voxel/test.py b/tests/regression_tests/plot_voxel/test.py index d2767e2f18..3b7a6bef28 100644 --- a/tests/regression_tests/plot_voxel/test.py +++ b/tests/regression_tests/plot_voxel/test.py @@ -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()