()
| 5900 | |
| 5901 | |
| 5902 | def test_load_store_chunk(): |
| 5903 | actual = np.array([0, 0, 0, 0, 0, 0]) |
| 5904 | load_store_chunk( |
| 5905 | x=np.array([1, 2, 3]), |
| 5906 | out=actual, |
| 5907 | region=None, |
| 5908 | index=slice(2, 5), |
| 5909 | lock=False, |
| 5910 | return_stored=False, |
| 5911 | load_stored=False, |
| 5912 | ) |
| 5913 | expected = np.array([0, 0, 1, 2, 3, 0]) |
| 5914 | assert all(actual == expected) |
| 5915 | # index should not be used on empty array |
| 5916 | actual = load_store_chunk( |
| 5917 | x=np.array([]), |
| 5918 | region=None, |
| 5919 | out=np.array([]), |
| 5920 | index=2, |
| 5921 | lock=False, |
| 5922 | return_stored=True, |
| 5923 | load_stored=False, |
| 5924 | ) |
| 5925 | expected = np.array([]) |
| 5926 | assert all(actual == expected) |
| 5927 | |
| 5928 | |
| 5929 | def test_scalar_setitem(): |
nothing calls this directly
no test coverage detected