(self)
| 296 | assert child.table is table |
| 297 | |
| 298 | def test_hybrid_descriptor_one(self): |
| 299 | class Point: |
| 300 | def __init__(self, x, y): |
| 301 | self.x, self.y = x, y |
| 302 | |
| 303 | @hybrid_method |
| 304 | def left_of(self, other): |
| 305 | return self.x < other.x |
| 306 | |
| 307 | self._fixture(Point) |
| 308 | alias = aliased(Point) |
| 309 | sess = fixture_session() |
| 310 | |
| 311 | self.assert_compile( |
| 312 | sess.query(alias).filter(alias.left_of(Point)), |
| 313 | "SELECT point_1.id AS point_1_id, point_1.x AS point_1_x, " |
| 314 | "point_1.y AS point_1_y FROM point AS point_1, point " |
| 315 | "WHERE point_1.x < point.x", |
| 316 | ) |
| 317 | |
| 318 | def test_hybrid_descriptor_two(self): |
| 319 | class Point: |
nothing calls this directly
no test coverage detected