Skip to content

Commit

Permalink
Add a test for numpy repr
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Jan 6, 2025
1 parent d29796b commit 9499245
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dkist/dataset/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ def test_repr(dataset, dataset_3d):
r = repr(dataset_3d)
assert str(dataset_3d.data) in r

def test_repr_numpy(dataset):
# Do it the old way to support old ndcube
dataset._data = dataset.data.compute()
r = repr(dataset)
assert "numpy.ndarray" in r
assert f"{dataset.data.shape}" in r
assert f"{dataset.data.dtype}" in r

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

View check run for this annotation

Codecov / codecov/patch

dkist/dataset/tests/test_dataset.py#L55-L59

Added lines #L55 - L59 were not covered by tests


@pytest.mark.accept_cli_dataset
def test_wcs_roundtrip(dataset):
Expand Down

0 comments on commit 9499245

Please sign in to comment.