-
-
Notifications
You must be signed in to change notification settings - Fork 1
Fix api test issues #15
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
Conversation
This was not actually testing passing in a file name...it was passing in an HDU.
Which, admittedly, should have been the approach from the beginning.
It is not even clear colormaps are part of the API...
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.
Pull Request Overview
This PR addresses issues in the API compatibility tests by fixing marker table return properties and error conditions while also marking the colormap test as xfail. Key changes include:
- Renaming and updating marker table check functions and replacing direct attribute accesses with helper methods.
- Modifying the FITS loading test to write and read from a temporary file.
- Enhancing error matching in tests for offset operations, stretch, and cuts.
Comments suppressed due to low confidence (1)
src/astro_image_display_api/widget_api_test.py:52
- [nitpick] Consider renaming '_check_empty_marker_table_return_properties' to a more concise name like '_assert_empty_marker_table' for clarity and brevity.
def _check_empty_marker_table_return_properties(self, table):
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.
Pull Request Overview
This PR addresses API test issues by refactoring marker-related testing functions, refining exception match patterns, and marking the colormap test as xfail for downstream compatibility.
- Renamed the marker table check method for clarity
- Updated exception match patterns in several tests
- Reworked file I/O in the FITS loading test and marked colormap tests as xfail
Comments suppressed due to low confidence (1)
src/astro_image_display_api/widget_api_test.py:110
- Verify that the error message pattern 'are not convertible' matches the actual message from the underlying unit conversion logic, considering possible library updates.
with pytest.raises(u.UnitConversionError, match='are not convertible'):
It turns out that there were a number of issues in the file that downstream packages would use to test API compatibility. This PR fixes them and marks one as
xfail
that tests colormaps.