(dtype)
| 2233 | |
| 2234 | |
| 2235 | def test_slice_replace_broadcast(dtype) -> None: |
| 2236 | values = xr.DataArray(["short", "a bit longer", "evenlongerthanthat", ""]).astype( |
| 2237 | dtype |
| 2238 | ) |
| 2239 | start = 2 |
| 2240 | stop = np.array([4, 5, None, 7]) |
| 2241 | repl = "test" |
| 2242 | |
| 2243 | expected = xr.DataArray(["shtestt", "a test longer", "evtest", "test"]).astype( |
| 2244 | dtype |
| 2245 | ) |
| 2246 | result = values.str.slice_replace(start, stop, repl) |
| 2247 | assert result.dtype == expected.dtype |
| 2248 | assert_equal(result, expected) |
| 2249 | |
| 2250 | |
| 2251 | def test_strip_lstrip_rstrip(dtype) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…