(self)
| 2967 | ) |
| 2968 | |
| 2969 | def test_implicitly_boolean(self): |
| 2970 | # test for expressions that the database always considers as boolean |
| 2971 | # even if there is no boolean datatype. |
| 2972 | assert not self.table1.c.myid._is_implicitly_boolean |
| 2973 | assert (self.table1.c.myid == 5)._is_implicitly_boolean |
| 2974 | assert (self.table1.c.myid == 5).self_group()._is_implicitly_boolean |
| 2975 | assert (self.table1.c.myid == 5).label("x")._is_implicitly_boolean |
| 2976 | assert not_(self.table1.c.myid == 5)._is_implicitly_boolean |
| 2977 | assert or_( |
| 2978 | self.table1.c.myid == 5, self.table1.c.myid == 7 |
| 2979 | )._is_implicitly_boolean |
| 2980 | assert not column("x", Boolean)._is_implicitly_boolean |
| 2981 | assert not (self.table1.c.myid + 5)._is_implicitly_boolean |
| 2982 | assert not not_(column("x", Boolean))._is_implicitly_boolean |
| 2983 | assert ( |
| 2984 | not select(self.table1.c.myid) |
| 2985 | .scalar_subquery() |
| 2986 | ._is_implicitly_boolean |
| 2987 | ) |
| 2988 | assert not text("x = y")._is_implicitly_boolean |
| 2989 | assert not literal_column("x = y")._is_implicitly_boolean |
| 2990 | |
| 2991 | def test_scalar_select(self): |
| 2992 | t = self.table1 |
nothing calls this directly
no test coverage detected