def test_spectralwcs_validator(self): energyTest = EnergyTestUtil() good_spectral_wcs = energyTest.good_wcs() assert (good_spectral_wcs.axis.function is not None) wcsvalidator._validate_spectral_wcs(good_spectral_wcs) wcsvalidator._validate_spectral_wcs(None)
def test_invalid_spectral_wcs(self): energytest = EnergyTestUtil() energy_wcs = energytest.bad_wcs() with pytest.raises(InvalidWCSError): wcsvalidator._validate_spectral_wcs(energy_wcs)