Skip to content

Commit

Permalink
Remove test moved to glue-core
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Jul 12, 2024
1 parent fc97440 commit 0bc0579
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions glue_qt/viewers/image/tests/test_data_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,45 +935,3 @@ def test_session_rgb_back_compat(self, protocol):
assert layer_state.color == 'b'

ga.close()


def test_indexed_data(capsys):

# Make sure that the image viewer works properly with IndexedData objects

data_4d = Data(label='hypercube_wcs',
x=np.random.random((3, 5, 4, 3)),
coords=WCS(naxis=4))

data_2d = IndexedData(data_4d, (2, None, 3, None))

application = GlueApplication()

session = application.session

hub = session.hub

data_collection = session.data_collection
data_collection.append(data_4d)
data_collection.append(data_2d)

viewer = application.new_data_viewer(ImageViewer)
viewer.add_data(data_2d)

assert viewer.state.x_att is data_2d.pixel_component_ids[1]
assert viewer.state.y_att is data_2d.pixel_component_ids[0]
assert viewer.state.x_att_world is data_2d.world_component_ids[1]
assert viewer.state.y_att_world is data_2d.world_component_ids[0]

process_events()

application.close()

# Some exceptions used to happen during callbacks, and these show up
# in stderr but don't interrupt the code, so we make sure here that
# nothing was printed to stdout nor stderr.

out, err = capsys.readouterr()

assert out.strip() == ""
assert err.strip() == ""

0 comments on commit 0bc0579

Please sign in to comment.