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

change asdf.tests.helpers use to asdf.testing.helpers #168

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Feb 23, 2023

asdf.tests.helpers is being deprecated in:
asdf-format/asdf#1440

This PR updates the uses of asdf.tests.yaml_to_asdf to use asdf.testing.yaml_to_asdf.

braingram added a commit to braingram/specutils that referenced this pull request Feb 23, 2023
asdf.tests.helpers will be deprecated:
astropy/asdf-astropy#168

The uses in specutils are limited to assert_roundtrip_tree

A similar roundtrip_object exists in asdf.testing.helpers
which serializes then deserializes an object (without asserting
equality). This commit replaces the uses of assert_roundtrip_tree
with roundtrip_object and uses the equality comparison built into
the custom asdf types implemented in this module to check for
equality. These equality comparisons are the same checks that
were used internally by assert_roundtrip_tree.
braingram added a commit to braingram/specutils that referenced this pull request Feb 23, 2023
asdf.tests.helpers will be deprecated:
astropy/asdf-astropy#168

The uses in specutils are limited to assert_roundtrip_tree

A similar roundtrip_object exists in asdf.testing.helpers
which serializes then deserializes an object (without asserting
equality). This commit replaces the uses of assert_roundtrip_tree
with roundtrip_object and uses the equality comparison built into
the custom asdf types implemented in this module to check for
equality. These equality comparisons are the same checks that
were used internally by assert_roundtrip_tree.
@braingram braingram marked this pull request as draft February 23, 2023 20:18
@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Merging #168 (dd383b9) into main (4ab328a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #168   +/-   ##
=======================================
  Coverage   99.40%   99.40%           
=======================================
  Files          55       55           
  Lines        2001     2003    +2     
=======================================
+ Hits         1989     1991    +2     
  Misses         12       12           
Impacted Files Coverage Δ
...astropy/converters/coordinates/tests/test_frame.py 100.00% <100.00%> (ø)
asdf_astropy/converters/fits/tests/test_fits.py 100.00% <100.00%> (ø)
asdf_astropy/converters/table/tests/test_table.py 100.00% <100.00%> (ø)
asdf_astropy/converters/time/tests/test_time.py 100.00% <100.00%> (ø)
...tropy/converters/transform/tests/test_transform.py 97.84% <100.00%> (ø)
...sdf_astropy/converters/unit/tests/test_quantity.py 100.00% <100.00%> (ø)
asdf_astropy/converters/unit/tests/test_unit.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@WilliamJamieson
Copy link
Contributor

@braingram these changes look good. Mark this as "Ready for review" if you are happy with the changes.

@braingram braingram marked this pull request as ready for review February 24, 2023 15:20
@WilliamJamieson WilliamJamieson merged commit c409b50 into astropy:main Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants