On this line:
|
and self.cell_methods == other.cell_methods |
cell methods is compared in a way which seems like it cares about the order of the cell methods. It may be more appropriate to check equality in a way which ignores order (perhaps by comparing sets).