Skip to content

Commit 1851b70

Browse files
committed
Fix single label test in set/get viewport
1 parent ebef641 commit 1851b70

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/astro_image_display_api/widget_api_test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,23 +248,24 @@ def test_set_get_view_port_no_image_label(self, data):
248248

249249
def test_set_get_viewport_single_label(self, data):
250250
# If there is only one image, the viewport should be able to be set
251-
# and retrieved with an image label.
251+
# and retrieved without an image label as long as the image
252+
# has an image label.
252253

253254
# Add an image with an image label
254255
self.image.load_image(data, image_label='test')
255256

256257
# Getting the viewport should not fail...
257-
vport = self.image.get_viewport(image_label='test')
258+
vport = self.image.get_viewport()
258259
assert 'center' in vport
259260
assert 'fov' in vport
260261
assert 'image_label' in vport
261262
assert vport['image_label'] == 'test'
262263

263264
# Set the viewport with an image label
264-
self.image.set_viewport(center=(10, 10), fov=100, image_label='test')
265+
self.image.set_viewport(center=(10, 10), fov=100)
265266

266267
# Getting the viewport again should return the same values
267-
vport = self.image.get_viewport(image_label='test')
268+
vport = self.image.get_viewport()
268269
assert vport['center'] == (10, 10)
269270
assert vport['fov'] == 100
270271
assert vport['image_label'] == 'test'

0 commit comments

Comments
 (0)