()
| 28 | |
| 29 | @pytest.fixture |
| 30 | def left_right(): |
| 31 | low, high, n = -1 << 10, 1 << 10, 1 << 20 |
| 32 | left = DataFrame( |
| 33 | np.random.default_rng(2).integers(low, high, (n, 7)), columns=list("ABCDEFG") |
| 34 | ) |
| 35 | left["left"] = left.sum(axis=1) |
| 36 | right = left.sample( |
| 37 | frac=1, random_state=np.random.default_rng(2), ignore_index=True |
| 38 | ) |
| 39 | right.columns = [*right.columns[:-1].tolist(), "right"] |
| 40 | right["right"] *= -1 |
| 41 | return left, right |
| 42 | |
| 43 | |
| 44 | class TestSorting: |