Skip to content

Change how assert_xydata() handles sets of data with different shape #233

@marty-larocque

Description

@marty-larocque

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions