Skip to content

Commit

Permalink
Merge pull request #168 from braingram/testing_helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Feb 24, 2023
2 parents f26dd63 + dd383b9 commit c409b50
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion asdf_astropy/converters/coordinates/tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import asdf
import numpy as np
import pytest
from asdf.testing.helpers import yaml_to_asdf
from astropy import units as u
from astropy.coordinates import (
CIRS,
Expand Down Expand Up @@ -114,7 +115,7 @@ def test_legacy_icrs_deseialize():
unit: deg"""
truth = ICRS(ra=Longitude(25, unit=u.deg), dec=Latitude(45, unit=u.deg))

buff = asdf.tests.helpers.yaml_to_asdf(f"example: {example.strip()}")
buff = yaml_to_asdf(f"example: {example.strip()}")
with asdf.AsdfFile() as af:
af._open_impl(af, buff, mode="rw")
assert_frame_equal(af["example"], truth)
2 changes: 1 addition & 1 deletion asdf_astropy/converters/fits/tests/test_fits.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asdf
import numpy as np
import pytest
from asdf.tests.helpers import yaml_to_asdf
from asdf.testing.helpers import yaml_to_asdf
from astropy.io import fits
from numpy.testing import assert_array_equal

Expand Down
2 changes: 1 addition & 1 deletion asdf_astropy/converters/table/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import astropy.units as u
import numpy as np
import pytest
from asdf.tests.helpers import yaml_to_asdf
from asdf.testing.helpers import yaml_to_asdf
from astropy.coordinates import EarthLocation, SkyCoord
from astropy.table import Column, MaskedColumn, NdarrayMixin, QTable, Table
from astropy.time import Time, TimeDelta
Expand Down
3 changes: 2 additions & 1 deletion asdf_astropy/converters/time/tests/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import asdf
import numpy as np
import pytest
from asdf.testing.helpers import yaml_to_asdf
from astropy import units as u
from astropy.coordinates import EarthLocation
from astropy.time import Time
Expand Down Expand Up @@ -110,7 +111,7 @@ def create_examples():

@pytest.mark.parametrize("example", create_examples())
def test_read_examples(example):
buff = asdf.tests.helpers.yaml_to_asdf(f"example: {example['example'].strip()}")
buff = yaml_to_asdf(f"example: {example['example'].strip()}")
with asdf.AsdfFile() as af:
af._open_impl(af, buff, mode="rw")
assert np.all(af["example"] == example["truth"])
Expand Down
2 changes: 1 addition & 1 deletion asdf_astropy/converters/transform/tests/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import astropy.modeling
import numpy as np
import pytest
from asdf.tests.helpers import yaml_to_asdf
from asdf.testing.helpers import yaml_to_asdf
from astropy import units as u
from astropy.modeling import models as astropy_models
from astropy.modeling.bounding_box import CompoundBoundingBox, ModelBoundingBox
Expand Down
2 changes: 1 addition & 1 deletion asdf_astropy/converters/unit/tests/test_quantity.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asdf
import numpy as np
import pytest
from asdf.tests import helpers
from asdf.testing import helpers
from astropy import units
from astropy.units import Quantity
from numpy.testing import assert_array_equal
Expand Down
2 changes: 1 addition & 1 deletion asdf_astropy/converters/unit/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import asdf
import pytest
from asdf.tests import helpers
from asdf.testing import helpers
from astropy import units


Expand Down

0 comments on commit c409b50

Please sign in to comment.