| 2018 | ) |
| 2019 | |
| 2020 | def test_clauses(self): |
| 2021 | User, Address = self.classes.User, self.classes.Address |
| 2022 | |
| 2023 | for expr, compare in ( |
| 2024 | (func.max(User.id), "max(users.id)"), |
| 2025 | (User.id.desc(), "users.id DESC"), |
| 2026 | ( |
| 2027 | between(5, User.id, Address.id), |
| 2028 | ":param_1 BETWEEN users.id AND addresses.id", |
| 2029 | ), |
| 2030 | # this one would require adding compile() to |
| 2031 | # InstrumentedScalarAttribute. do we want this ? |
| 2032 | # (User.id, "users.id") |
| 2033 | ): |
| 2034 | c = expr.compile(dialect=default.DefaultDialect()) |
| 2035 | assert str(c) == compare, "%s != %s" % (str(c), compare) |
| 2036 | |
| 2037 | |
| 2038 | class ExpressionTest(QueryTest, AssertsCompiledSQL): |