def test_field1d_get_position(): fld = fls.Field1D(4, 0.1, 1, 1, int(5)) assert np.allclose(fld.get_position(fld.get_index(0.1)), 0.1)