(self)
| 156 | assert not struct.is_other(s2) |
| 157 | |
| 158 | def test_no_clone(self): |
| 159 | struct = B( |
| 160 | A("expr1"), A("expr2"), B(A("expr1b"), A("expr2b")), A("expr3") |
| 161 | ) |
| 162 | |
| 163 | class Vis(ClauseVisitor): |
| 164 | def visit_a(self, a): |
| 165 | pass |
| 166 | |
| 167 | def visit_b(self, b): |
| 168 | pass |
| 169 | |
| 170 | vis = Vis() |
| 171 | s2 = vis.traverse(struct) |
| 172 | assert struct == s2 |
| 173 | assert struct.is_other(s2) |
| 174 | |
| 175 | def test_clone_anon_label(self): |
| 176 | from sqlalchemy.sql.elements import Grouping |