-
Notifications
You must be signed in to change notification settings - Fork 4
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
Integration Test Failing due to Unordered List #654
Conversation
metadata_links = data[0].meta | ||
assert len(metadata_links) == 1 | ||
assert "metadatum1" in metadata_links | ||
assert metadata_links["metadatum1"] == "temporary" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add back this assertion to make sure this change equivalent to the old test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value isnt defined in the test so im not sure why this is necessary. The assertion is handled by datum.meta == md1
or datum.meta == md2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no regression in test coverage so im confused why this matters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense!
metadata_links = data[1].meta | ||
assert len(metadata_links) == 2 | ||
assert "metadatum2" in metadata_links | ||
assert metadata_links["metadatum2"] == "a string" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with this line and 285
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above.
Reproducible Example
`integration_tests/client/datasets/test_dataset.py::test_create_tabular_dataset_and_add_groundtruth`
Issue Description
The test queries from postgres and treats the response as an ordered list which it is not.
Test failure is dependent on what order postgres returns its response.
Expected Behavior
The test should not assume an ordered response from postgres.