-
Notifications
You must be signed in to change notification settings - Fork 58
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
Cleanup asdf._tests._helpers #1703
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
braingram
force-pushed
the
cleanup_helpers
branch
from
December 13, 2023 19:00
7f01e34
to
82127c4
Compare
braingram
force-pushed
the
cleanup_helpers
branch
from
January 3, 2024 22:07
3aca9a1
to
fb9ea48
Compare
braingram
force-pushed
the
cleanup_helpers
branch
3 times, most recently
from
February 14, 2024 15:54
a471c37
to
5984829
Compare
braingram
force-pushed
the
cleanup_helpers
branch
3 times, most recently
from
February 27, 2024 14:55
50d4b67
to
db99b6d
Compare
zacharyburnett
approved these changes
May 7, 2024
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.
this looks good to me and simplifies the test fixtures; can it be rebased or is this branch too far gone to be worth it?
Thanks for the review! I will (attempt to) resolve the conflicts 😬 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR cleans up
asdf._tests._helpers
removing all butassert_tree_match
. This PR removes:get_test_data_path
replaced with a test fixture usingimportlib.resources
(data for commands tests were moved to_tests.data
to simplify paths)assert_roundtrip_tree
replaced withasdf.testing.helpers.assert_roundtrip_object
and more explicitassert
statements to compare the feature being tested in any given testyaml_to_asdf
replaced withasdf.testing.helpers.yaml_to_asdf
get_file_sizes
replaced with uses ofpathlib.Path
and calls tostat().st_size
display_warnings
unused, removedassert_no_warnings
all uses removed, tests already run with a filter that turns warnings into errors, a pytest configuration was added to_tests/conftest
to make sure that this filter applies to all runs (even through throughpytest --pyargs asdf
as is run during theBuild
CI test)_assert_extension_type_correctness
unused, removedAlthough not removed
assert_tree_match
was simplified (removing unused arguments and other unused code).assert_roundtrip_tree
performed a number of tests for round tripping (that are not all performed bytesting.helpers.roundtrip_object
):BytesIO
, tested withassert_roundtrip_object
fsspec
in test_asdf.pyThe simplification of
assert_tree_match
will further break the test_reference_files.py tests that have not been running since Feb 2022. When run manually (by checking out asdf-standard as if it were still a submodule) these fail without this PR and likely these should be updated and possibly moved to the asdf-standard test suite (which is run as part of the asdf CI). There is already an open issue for these tests: #1522Removal of
assert_roundtrip_tree
allowed for the removal of the bundledextern.RangeHTTPServer
(removed in this PR).Fixes #798
Checklist: