def test_get(self, update, request, ref_path, view, output, flatten, prune): result = Result(ref_path / '4grains2x4x3_compressionY.hdf5') for key, value in view.items(): result = result.view(key, value) fname = request.node.name cur = result.get(output, flatten, prune) if update: with bz2.BZ2File((ref_path / 'get' / fname).with_suffix('.pbz2'), 'w') as f: pickle.dump(cur, f) with bz2.BZ2File((ref_path / 'get' / fname).with_suffix('.pbz2')) as f: ref = pickle.load(f) assert cur is None if ref is None else dict_equal(cur, ref)
def test_marc_coordinates(self, ref_path): result = Result(ref_path / 'check_compile_job1.hdf5').view( 'increments', -1) c_n = result.coordinates0_node + result.get('u_n') c_p = result.coordinates0_point + result.get('u_p') assert len(c_n) > len(c_p)