From 2b46109ece3419886a863b6463da2916a42da592 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 26 Apr 2024 12:36:05 +0100 Subject: [PATCH] Added regression test --- glue/viewers/profile/tests/test_viewer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glue/viewers/profile/tests/test_viewer.py b/glue/viewers/profile/tests/test_viewer.py index 16a29b668..eb6f8e866 100644 --- a/glue/viewers/profile/tests/test_viewer.py +++ b/glue/viewers/profile/tests/test_viewer.py @@ -165,3 +165,9 @@ def test_unit_conversion(): assert_allclose(viewer.state.x_max, (0.5 * u.GHz).to_value(u.cm, equivalencies=u.spectral())) assert_allclose(viewer.state.y_min, 0.5) assert_allclose(viewer.state.y_max, 3.5) + + # Regression test for a bug that caused unit changes to not work on y axis + # if reference data was not first layer + + viewer.state.reference_data = d2 + viewer.state.y_display_unit = 'mJy'