def test_cache(self): class MD1(DataSetFamily): extra_dims = [('dim_0', ['a', 'b', 'c'])] class MD2(DataSetFamily): extra_dims = [('dim_0', ['a', 'b', 'c'])] MD1Slice = MD1.slice(dim_0='a') MD2Slice = MD2.slice(dim_0='a') assert_equal(MD1Slice.extra_coords, MD2Slice.extra_coords) assert_is_not(MD1Slice, MD2Slice)
def test_cache(self): class MD1(DataSetFamily): extra_dims = [("dim_0", ["a", "b", "c"])] class MD2(DataSetFamily): extra_dims = [("dim_0", ["a", "b", "c"])] MD1Slice = MD1.slice(dim_0="a") MD2Slice = MD2.slice(dim_0="a") assert_equal(MD1Slice.extra_coords, MD2Slice.extra_coords) assert_is_not(MD1Slice, MD2Slice)