Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor all unit tests that compare lists of dataclass objects to use equal_list #318

Open
vingkan opened this issue Jul 23, 2022 · 0 comments
Labels
data Related to data or types pipeline Related to the offline pipelines refactor Refactoring existing functionality testing Adds a test or enhances testing

Comments

@vingkan
Copy link
Collaborator

vingkan commented Jul 23, 2022

After #315 merges, we can find all unit tests that compare lists of dataclass objects and update them from:

assert actual == expected

To:

from pipeline.testing import equal_list
...
assert equal_list(actual, expected)

Which will enable easier test debugging if a test fails by only showing the dataclass attributes that differ in the first mismatched pair of items, rather than showing the entire list with all attributes of all items.

Will also need to handle #317,

@vingkan vingkan added refactor Refactoring existing functionality data Related to data or types testing Adds a test or enhances testing pipeline Related to the offline pipelines labels Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Related to data or types pipeline Related to the offline pipelines refactor Refactoring existing functionality testing Adds a test or enhances testing
Projects
None yet
Development

No branches or pull requests

1 participant