(self)
| 186 | eq_(e1.end, Point(None, None)) |
| 187 | |
| 188 | def test_eager_load(self): |
| 189 | Graph, Point = self.classes.Graph, self.classes.Point |
| 190 | |
| 191 | sess = self._fixture() |
| 192 | |
| 193 | g = sess.query(Graph).first() |
| 194 | sess.close() |
| 195 | |
| 196 | def go(): |
| 197 | g2 = sess.get( |
| 198 | Graph, g.id, options=[sa.orm.joinedload(Graph.edges)] |
| 199 | ) |
| 200 | |
| 201 | eq_( |
| 202 | [(e.start, e.end) for e in g2.edges], |
| 203 | [(Point(3, 4), Point(5, 6)), (Point(14, 5), Point(2, 7))], |
| 204 | ) |
| 205 | |
| 206 | self.assert_sql_count(testing.db, go, 1) |
| 207 | |
| 208 | def test_comparator(self): |
| 209 | Graph, Edge, Point = ( |
nothing calls this directly
no test coverage detected