def test_example_docstring_read_ovf_file_ovf2(): from ovf import OVFFile, OVF20 ovf_file = OVFFile("tmp_test_ovf2.ovf") assert ovf_file.content.ovf_version == OVF20 fl = ovf_file.get_field() assert fl.field_dim == 3 assert np.allclose(fl.field_data[0, :, :, 0], 1.) assert np.allclose(fl.field_data[1, :, :, 0], 2.) assert np.allclose(fl.field_data[2, :, :, 0], 3.)