()
| 2119 | |
| 2120 | |
| 2121 | def test_avoid_alignment(): |
| 2122 | a = pd.DataFrame({"x": range(100)}) |
| 2123 | da = from_pandas(a, npartitions=4) |
| 2124 | |
| 2125 | b = pd.DataFrame({"y": range(100)}) |
| 2126 | b["z"] = b.y * 2 |
| 2127 | db = from_pandas(b, npartitions=3) |
| 2128 | |
| 2129 | # Give correct results even when misaligned |
| 2130 | assert_eq(a.x + b.y, da.x + db.y) |
| 2131 | |
| 2132 | assert not any(isinstance(ex, OpAlignPartitions) for ex in (db.y + db.z).walk()) |
| 2133 | assert not any( |
| 2134 | isinstance(ex, OpAlignPartitions) for ex in (da.x + db.y.sum()).walk() |
| 2135 | ) |
| 2136 | |
| 2137 | |
| 2138 | def test_mixed_array_op(df, pdf): |
nothing calls this directly
no test coverage detected