This seems overly complex. How about just:
```python
    def _check_coords_and_dims_match(self, coords_and_dims_got,
                                     coords_and_dims_expected):
        # Sort both lists and compare
        key = lambda coord_and_dims: coord_and_dims[0].name()
        got = sorted(coords_and_dims_got, key=key)
        expected = sorted(coords_and_dims_expected, key=key)
        self.assertEqual(got, expected)
```