(self)
| 3158 | ) |
| 3159 | |
| 3160 | def test_implicitly_boolean(self): |
| 3161 | # test for expressions that the database always considers as boolean |
| 3162 | # even if there is no boolean datatype. |
| 3163 | assert not self.table1.c.myid._is_implicitly_boolean |
| 3164 | assert (self.table1.c.myid == 5)._is_implicitly_boolean |
| 3165 | assert (self.table1.c.myid == 5).self_group()._is_implicitly_boolean |
| 3166 | assert (self.table1.c.myid == 5).label("x")._is_implicitly_boolean |
| 3167 | assert not_(self.table1.c.myid == 5)._is_implicitly_boolean |
| 3168 | assert or_( |
| 3169 | self.table1.c.myid == 5, self.table1.c.myid == 7 |
| 3170 | )._is_implicitly_boolean |
| 3171 | assert not column("x", Boolean)._is_implicitly_boolean |
| 3172 | assert not (self.table1.c.myid + 5)._is_implicitly_boolean |
| 3173 | assert not not_(column("x", Boolean))._is_implicitly_boolean |
| 3174 | assert ( |
| 3175 | not select(self.table1.c.myid) |
| 3176 | .scalar_subquery() |
| 3177 | ._is_implicitly_boolean |
| 3178 | ) |
| 3179 | assert not text("x = y")._is_implicitly_boolean |
| 3180 | assert not literal_column("x = y")._is_implicitly_boolean |
| 3181 | |
| 3182 | def test_scalar_select(self): |
| 3183 | t = self.table1 |
nothing calls this directly
no test coverage detected