()
| 269 | |
| 270 | |
| 271 | def test_map_index(): |
| 272 | df = pd.DataFrame({"x": [1, 2, 3, 4, 5]}) |
| 273 | ddf = from_pandas(df, npartitions=2) |
| 274 | assert ddf.known_divisions is True |
| 275 | |
| 276 | with pytest.warns(UserWarning): |
| 277 | cleared = ddf.index.map(lambda x: x * 10) |
| 278 | assert cleared.known_divisions is False |
| 279 | |
| 280 | with pytest.warns(UserWarning): |
| 281 | applied = ddf.index.map(lambda x: x * 10, is_monotonic=True) |
| 282 | assert applied.known_divisions is True |
| 283 | assert applied.divisions == tuple(x * 10 for x in ddf.divisions) |
| 284 | |
| 285 | |
| 286 | def test_squeeze(): |
nothing calls this directly
no test coverage detected