test #6979
(self, test_case, expected_sql, expected_row)
| 285 | ), |
| 286 | ) |
| 287 | def test_dupe_cols(self, test_case, expected_sql, expected_row): |
| 288 | """test #6979""" |
| 289 | User, users = self.classes.User, self.tables.users |
| 290 | |
| 291 | self.mapper_registry.map_imperatively(User, users) |
| 292 | |
| 293 | s = fixture_session() |
| 294 | |
| 295 | expressions = testing.resolve_lambda(test_case, **locals()) |
| 296 | expected_num = len(expressions) |
| 297 | |
| 298 | q = s.query(*expressions) |
| 299 | |
| 300 | self.assert_compile(q, "SELECT %s FROM users" % expected_sql) |
| 301 | |
| 302 | row = q.order_by(User.id).first() |
| 303 | eq_(row, expected_row) |
| 304 | eq_(len(row), expected_num) |
| 305 | |
| 306 | @testing.combinations( |
| 307 | (lambda s, users: s.query(users),), |
nothing calls this directly
no test coverage detected