| 124 | return "B(%s)" % repr([str(i) for i in self.items]) |
| 125 | |
| 126 | def test_test_classes(self): |
| 127 | a1 = A("expr1") |
| 128 | struct = B(a1, A("expr2"), B(A("expr1b"), A("expr2b")), A("expr3")) |
| 129 | struct2 = B(a1, A("expr2"), B(A("expr1b"), A("expr2b")), A("expr3")) |
| 130 | struct3 = B( |
| 131 | a1, A("expr2"), B(A("expr1b"), A("expr2bmodified")), A("expr3") |
| 132 | ) |
| 133 | |
| 134 | assert a1.is_other(a1) |
| 135 | assert struct.is_other(struct) |
| 136 | assert struct == struct2 |
| 137 | assert struct != struct3 |
| 138 | assert not struct.is_other(struct2) |
| 139 | assert not struct.is_other(struct3) |
| 140 | |
| 141 | def test_clone(self): |
| 142 | struct = B( |