Skip to content

Commit 0c39863

Browse files
committed
Fix single label test in set/get viewport
1 parent e1016f4 commit 0c39863

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
@@ -236,23 +236,24 @@ def test_set_get_view_port_no_image_label(self, data):
236236

237237
def test_set_get_viewport_single_label(self, data):
238238
# If there is only one image, the viewport should be able to be set
239-
# and retrieved with an image label.
239+
# and retrieved without an image label as long as the image
240+
# has an image label.
240241

241242
# Add an image with an image label
242243
self.image.load_image(data, image_label='test')
243244

244245
# Getting the viewport should not fail...
245-
vport = self.image.get_viewport(image_label='test')
246+
vport = self.image.get_viewport()
246247
assert 'center' in vport
247248
assert 'fov' in vport
248249
assert 'image_label' in vport
249250
assert vport['image_label'] == 'test'
250251

251252
# Set the viewport with an image label
252-
self.image.set_viewport(center=(10, 10), fov=100, image_label='test')
253+
self.image.set_viewport(center=(10, 10), fov=100)
253254

254255
# Getting the viewport again should return the same values
255-
vport = self.image.get_viewport(image_label='test')
256+
vport = self.image.get_viewport()
256257
assert vport['center'] == (10, 10)
257258
assert vport['fov'] == 100
258259
assert vport['image_label'] == 'test'

0 commit comments

Comments
 (0)