Skip to content

Commit

Permalink
Disregard last, error is in the data which is exactly the point of th…
Browse files Browse the repository at this point in the history
…is PR
  • Loading branch information
SolarDrew committed Sep 26, 2024
1 parent 70d3b92 commit 3ce0054
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dkist/dataset/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ def test_repr(dataset, dataset_3d):
assert str(dataset_3d.data) in r


@pytest.mark.accept_cli_dataset
def test_wcs_roundtrip(dataset):
# TOO generalise this so mark.accept_cli_dataset will work, if possible
p = (10*u.pixel, 10*u.pixel)
p = [1*u.pixel] * dataset.wcs.pixel_n_dim

Check warning on line 56 in dkist/dataset/tests/test_dataset.py

View check run for this annotation

Codecov / codecov/patch

dkist/dataset/tests/test_dataset.py#L56

Added line #L56 was not covered by tests
w = dataset.wcs.pixel_to_world(*p)
p2 = dataset.wcs.world_to_pixel(w)
p2 = dataset.wcs.world_to_pixel(*w)

Check warning on line 58 in dkist/dataset/tests/test_dataset.py

View check run for this annotation

Codecov / codecov/patch

dkist/dataset/tests/test_dataset.py#L58

Added line #L58 was not covered by tests
assert_quantity_allclose(p, p2 * u.pix)


def test_wcs_roundtrip_3d(dataset_3d):
# TOO generalise this so mark.accept_cli_dataset will work, if possible
p = (10*u.pixel, 10*u.pixel, 10*u.pixel)
w = dataset_3d.wcs.pixel_to_world(*p)
p2 = dataset_3d.wcs.world_to_pixel(*w) * u.pix
Expand Down

0 comments on commit 3ce0054

Please sign in to comment.