(item, item_copy)
| 162 | m_copy = deep_copy(m) |
| 163 | |
| 164 | def check(item, item_copy): |
| 165 | assert type(item) is type(item_copy) |
| 166 | assert item._name == item_copy._name |
| 167 | for attr in item.__dict__.keys(): |
| 168 | if not attr.startswith("_"): |
| 169 | assert getattr(item, attr) == getattr(item_copy, attr) |
| 170 | assert item is not item_copy |
| 171 | assert item._id != item_copy._id |
| 172 | for child, child_copy in zip( |
| 173 | item._children.values(), item_copy._children.values() |
| 174 | ): |
| 175 | check(child, child_copy) |
| 176 | |
| 177 | check(m, m_copy) |
| 178 |