| 3129 | is_((-self.table1.c.myid).type, self.table1.c.myid.type) |
| 3130 | |
| 3131 | def test_negate_operator_label(self): |
| 3132 | orig_expr = or_( |
| 3133 | self.table1.c.myid == 1, self.table1.c.myid == 2 |
| 3134 | ).label(class="st">"foo") |
| 3135 | expr = not_(orig_expr) |
| 3136 | isinstance(expr, Label) |
| 3137 | eq_(expr.name, class="st">"foo") |
| 3138 | is_not(expr, orig_expr) |
| 3139 | is_(expr._element.operator, operator.inv) class="cm"># e.g. and not false_ |
| 3140 | |
| 3141 | self.assert_compile( |
| 3142 | expr, |
| 3143 | class="st">"NOT (mytable.myid = :myid_1 OR mytable.myid = :myid_2)", |
| 3144 | dialect=default.DefaultDialect(supports_native_boolean=False), |
| 3145 | ) |
| 3146 | |
| 3147 | def test_negate_operator_self_group(self): |
| 3148 | orig_expr = or_( |