Test line-by-line assertion

This commit is contained in:
YoungHui Park 2020-11-06 18:14:07 -06:00
parent 8b08da7405
commit 2b95dd30e2

View file

@ -77,7 +77,8 @@ class SurfaceSourceTestHarness(PyAPITestHarness):
src_true = f['source_bank'][()]
with h5py.File("surface_source.h5", 'r') as f:
src_test = f['source_bank'][()]
assert np.all(np.sort(src_true) == np.sort(src_test))
for (true_p, test_p) in zip(np.sort(src_true), np.sort(src_test)):
assert true_p == test_p
def execute_test(self):
"""Build input XMLs, run OpenMC, check output and results."""