base.assert_xydata() uses np.testing.assert_array_max_ulp() to compare xy_data and xy_expected. When these two sets of data have the same shape but different data, assert_xydata() throws and AssertionError with a custom message.
However, when xy_data and xy_expected have different shapes, assert_array_max_ulp() throws a ValueError that is not caught. For our purposes, this is effectively a case in which xy_data and xy_expected do not match and should be handled the same way.
We should handle this case the same way and throw an AssertionError with a custom message.