()
| 6124 | |
| 6125 | |
| 6126 | def test_load_store_chunk(): |
| 6127 | actual = np.array([0, 0, 0, 0, 0, 0]) |
| 6128 | load_store_chunk( |
| 6129 | x=np.array([1, 2, 3]), |
| 6130 | out=actual, |
| 6131 | region=None, |
| 6132 | index=slice(2, 5), |
| 6133 | lock=False, |
| 6134 | return_stored=False, |
| 6135 | load_stored=False, |
| 6136 | ) |
| 6137 | expected = np.array([0, 0, 1, 2, 3, 0]) |
| 6138 | assert all(actual == expected) |
| 6139 | # index should not be used on empty array |
| 6140 | actual = load_store_chunk( |
| 6141 | x=np.array([]), |
| 6142 | region=None, |
| 6143 | out=np.array([]), |
| 6144 | index=2, |
| 6145 | lock=False, |
| 6146 | return_stored=True, |
| 6147 | load_stored=False, |
| 6148 | ) |
| 6149 | expected = np.array([]) |
| 6150 | assert all(actual == expected) |
| 6151 | |
| 6152 | |
| 6153 | def test_scalar_setitem(): |
nothing calls this directly
no test coverage detected