(self, operator, right)
| 153 | id_=class="st">"ns", |
| 154 | ) |
| 155 | def test_operate(self, operator, right): |
| 156 | left = column(class="st">"left") |
| 157 | |
| 158 | if operators.is_comparison(operator): |
| 159 | type_ = sqltypes.BOOLEANTYPE |
| 160 | else: |
| 161 | type_ = sqltypes.NULLTYPE |
| 162 | |
| 163 | assert left.comparator.operate(operator, right).compare( |
| 164 | BinaryExpression( |
| 165 | coercions.expect(roles.WhereHavingRole, left), |
| 166 | coercions.expect(roles.WhereHavingRole, right), |
| 167 | operator, |
| 168 | type_=type_, |
| 169 | ) |
| 170 | ) |
| 171 | |
| 172 | modifiers = operator(left, right).modifiers |
| 173 | |
| 174 | assert operator(left, right).compare( |
| 175 | BinaryExpression( |
| 176 | coercions.expect(roles.WhereHavingRole, left), |
| 177 | coercions.expect(roles.WhereHavingRole, right), |
| 178 | operator, |
| 179 | modifiers=modifiers, |
| 180 | type_=type_, |
| 181 | ) |
| 182 | ) |
| 183 | |
| 184 | self._loop_test(operator, right) |
| 185 | |
| 186 | if operators.is_comparison(operator): |
| 187 | is_( |
| 188 | left.comparator.operate(operator, right).type, |
| 189 | sqltypes.BOOLEANTYPE, |
| 190 | ) |
| 191 | |
| 192 | def _loop_test(self, operator, *arg): |
| 193 | loop = LoopOperate() |
nothing calls this directly
no test coverage detected