()
| 6087 | |
| 6088 | |
| 6089 | def test_load_store_chunk(): |
| 6090 | actual = np.array([0, 0, 0, 0, 0, 0]) |
| 6091 | load_store_chunk( |
| 6092 | x=np.array([1, 2, 3]), |
| 6093 | out=actual, |
| 6094 | region=None, |
| 6095 | index=slice(2, 5), |
| 6096 | lock=False, |
| 6097 | return_stored=False, |
| 6098 | load_stored=False, |
| 6099 | ) |
| 6100 | expected = np.array([0, 0, 1, 2, 3, 0]) |
| 6101 | assert all(actual == expected) |
| 6102 | # index should not be used on empty array |
| 6103 | actual = load_store_chunk( |
| 6104 | x=np.array([]), |
| 6105 | region=None, |
| 6106 | out=np.array([]), |
| 6107 | index=2, |
| 6108 | lock=False, |
| 6109 | return_stored=True, |
| 6110 | load_stored=False, |
| 6111 | ) |
| 6112 | expected = np.array([]) |
| 6113 | assert all(actual == expected) |
| 6114 | |
| 6115 | |
| 6116 | def test_scalar_setitem(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…