(pdf)
| 476 | |
| 477 | |
| 478 | def test_memory_usage(pdf): |
| 479 | # Results are not equal with RangeIndex because pandas has one RangeIndex while |
| 480 | # we have one RangeIndex per partition |
| 481 | pdf.index = np.arange(len(pdf)) |
| 482 | df = from_pandas(pdf) |
| 483 | assert_eq(df.memory_usage(), pdf.memory_usage()) |
| 484 | assert_eq(df.memory_usage(index=False), pdf.memory_usage(index=False)) |
| 485 | assert_eq(df.x.memory_usage(), pdf.x.memory_usage()) |
| 486 | assert_eq(df.x.memory_usage(index=False), pdf.x.memory_usage(index=False)) |
| 487 | assert_eq(df.index.memory_usage(), pdf.index.memory_usage()) |
| 488 | with pytest.raises(TypeError, match="got an unexpected keyword"): |
| 489 | df.index.memory_usage(index=True) |
| 490 | |
| 491 | |
| 492 | @pytest.mark.parametrize("func", [M.nlargest, M.nsmallest]) |
nothing calls this directly
no test coverage detected