From f5359d9f215eb5f30e8289cf7f5d4af9afc35582 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 12 Jul 2024 14:33:01 +0100 Subject: [PATCH] Fix deprecated attribute --- glue/viewers/common/tests/test_stretch_state_mixin.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/glue/viewers/common/tests/test_stretch_state_mixin.py b/glue/viewers/common/tests/test_stretch_state_mixin.py index 4325342ba..778b9ab78 100644 --- a/glue/viewers/common/tests/test_stretch_state_mixin.py +++ b/glue/viewers/common/tests/test_stretch_state_mixin.py @@ -39,13 +39,16 @@ def test_invalid_parameter(self): self.state.stretch_parameters["foo"] = 1 def test_set_parameter(self): + + pytest.importorskip('astropy', minversion='6.0') + self.state.stretch = "log" - assert self.state.stretch_object.exp == 1000 + assert self.state.stretch_object.a == 1000 # Setting the stretch parameter 'exp' is synced with the stretch object attribute - self.state.stretch_parameters["exp"] = 200 - assert self.state.stretch_object.exp == 200 + self.state.stretch_parameters["a"] = 200 + assert self.state.stretch_object.a == 200 # Changing stretch resets the stretch parameter dictionary self.state.stretch = "linear" @@ -53,4 +56,4 @@ def test_set_parameter(self): # And there is no memory of previous parameters self.state.stretch = "log" - assert self.state.stretch_object.exp == 1000 + assert self.state.stretch_object.a == 1000