()
| 2141 | |
| 2142 | |
| 2143 | def test_store(): |
| 2144 | d = da.ones((4, 4), chunks=(2, 2)) |
| 2145 | a, b = d + 1, d + 2 |
| 2146 | |
| 2147 | at = np.empty(shape=(4, 4)) |
| 2148 | bt = np.empty(shape=(4, 4)) |
| 2149 | |
| 2150 | st = store([a, b], [at, bt]) |
| 2151 | assert st is None |
| 2152 | assert (at == 2).all() |
| 2153 | assert (bt == 3).all() |
| 2154 | |
| 2155 | pytest.raises(ValueError, lambda: store([a], [at, bt])) |
| 2156 | pytest.raises(ValueError, lambda: store(at, at)) |
| 2157 | pytest.raises(ValueError, lambda: store([at, bt], [at, bt])) |
| 2158 | |
| 2159 | |
| 2160 | def test_store_regions(): |