()
| 2082 | |
| 2083 | |
| 2084 | def test_avoid_alignment(): |
| 2085 | a = pd.DataFrame({"x": range(100)}) |
| 2086 | da = from_pandas(a, npartitions=4) |
| 2087 | |
| 2088 | b = pd.DataFrame({"y": range(100)}) |
| 2089 | b["z"] = b.y * 2 |
| 2090 | db = from_pandas(b, npartitions=3) |
| 2091 | |
| 2092 | # Give correct results even when misaligned |
| 2093 | assert_eq(a.x + b.y, da.x + db.y) |
| 2094 | |
| 2095 | assert not any(isinstance(ex, OpAlignPartitions) for ex in (db.y + db.z).walk()) |
| 2096 | assert not any( |
| 2097 | isinstance(ex, OpAlignPartitions) for ex in (da.x + db.y.sum()).walk() |
| 2098 | ) |
| 2099 | |
| 2100 | |
| 2101 | def test_mixed_array_op(df, pdf): |
nothing calls this directly
no test coverage detected