(self, custom, operator, fwd_op, rev_op)
| 1837 | argnames="operator, fwd_op, rev_op", |
| 1838 | ) |
| 1839 | def test_comparator_behavior(self, custom, operator, fwd_op, rev_op): |
| 1840 | self._fixture(custom) |
| 1841 | Edge, Point = self.classes("Edge", "Point") |
| 1842 | |
| 1843 | self.assert_compile( |
| 1844 | select(Edge).filter(operator(Edge.start, Point(3, 4))), |
| 1845 | "SELECT edge.id, edge.x1, edge.y1, edge.x2, edge.y2 FROM edge " |
| 1846 | f"WHERE edge.x1 {fwd_op} :x1_1 AND edge.y1 {fwd_op} :y1_1", |
| 1847 | checkparams={"x1_1": 3, "y1_1": 4}, |
| 1848 | ) |
| 1849 | |
| 1850 | self.assert_compile( |
| 1851 | select(Edge).filter(~operator(Edge.start, Point(3, 4))), |
| 1852 | "SELECT edge.id, edge.x1, edge.y1, edge.x2, edge.y2 FROM edge " |
| 1853 | f"WHERE NOT (edge.x1 {fwd_op} :x1_1 AND edge.y1 {fwd_op} :y1_1)", |
| 1854 | checkparams={"x1_1": 3, "y1_1": 4}, |
| 1855 | ) |
| 1856 | |
| 1857 | @testing.combinations(True, False, argnames="custom") |
| 1858 | @testing.combinations( |
nothing calls this directly
no test coverage detected