From 6871b1f8183319eede899c2f6dd9bae3e3df8678 Mon Sep 17 00:00:00 2001 From: "Pey Lian Lim (Github)" <2090236+pllim@users.noreply.github.com> Date: Mon, 21 Feb 2022 12:52:58 -0500 Subject: [PATCH] TST: Silence specutil warning in fixture --- jdaviz/configs/mosviz/tests/test_helper.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jdaviz/configs/mosviz/tests/test_helper.py b/jdaviz/configs/mosviz/tests/test_helper.py index d3c8d84d6f..ed3c432eff 100644 --- a/jdaviz/configs/mosviz/tests/test_helper.py +++ b/jdaviz/configs/mosviz/tests/test_helper.py @@ -1,3 +1,4 @@ +import warnings import astropy.units as u import csv import numpy as np @@ -67,7 +68,10 @@ def spectrum2d(): def spectrum_collection(spectrum1d): sc = [spectrum1d]*5 - return SpectrumCollection.from_spectra(sc) + with warnings.catch_warnings(): + warnings.simplefilter('ignore') + result = SpectrumCollection.from_spectra(sc) + return result @pytest.fixture