

def test_lons_values_incorrectly_gridded(self):
    times = np.array([dt.datetime(2000, x, 1) for x in range(1, 13)])
    lats = np.arange((- 30), 30)
    bad_lons = np.arange(360)
    flat_array = np.arange(((len(times) * len(lats)) * len(bad_lons)))
    values = flat_array.reshape(len(times), len(lats), len(bad_lons))
    ds = Dataset(lats, bad_lons, times, values)
    np.testing.assert_array_equal(ds.lons, np.arange((- 180), 180))

dataset/ETHPy150Open apache/climate/ocw/tests/test_dataset.py TestInvalidDatasetInit.test_lons_values_incorrectly_gridded/original