예제 #1
0
 def test_that_raises_when_lower_wavelength_is_smaller_than_high_wavelength(self):
     state = StateWavelengthAndPixelAdjustment()
     state.wavelength_low = 2.
     state.wavelength_high = 1.
     state.wavelength_step = 2.
     state.wavelength_step_type = RangeStepType.Lin
     assert_validate_error(self, ValueError, state)
예제 #2
0
 def test_that_raises_when_lower_wavelength_is_smaller_than_high_wavelength(
         self):
     state = StateWavelengthAndPixelAdjustment()
     state.wavelength_low = [2.]
     state.wavelength_high = [1.]
     state.wavelength_step = 2.
     state.wavelength_step_type = RangeStepType.Lin
     assert_validate_error(self, ValueError, state)
예제 #3
0
 def test_that_raises_when_wavelength_entry_is_missing(self):
     # Arrange
     state = StateWavelengthAndPixelAdjustment()
     assert_validate_error(self, ValueError, state)
     state.wavelength_low = [1.]
     assert_validate_error(self, ValueError, state)
     state.wavelength_high = [2.]
     assert_validate_error(self, ValueError, state)
     state.wavelength_step = 2.
     assert_validate_error(self, ValueError, state)
     state.wavelength_step_type = RangeStepType.Lin
     assert_raises_nothing(self, state)
예제 #4
0
 def test_that_raises_when_wavelength_entry_is_missing(self):
     # Arrange
     state = StateWavelengthAndPixelAdjustment()
     assert_validate_error(self, ValueError, state)
     state.wavelength_low = 1.
     assert_validate_error(self, ValueError, state)
     state.wavelength_high = 2.
     assert_validate_error(self, ValueError, state)
     state.wavelength_step = 2.
     assert_validate_error(self, ValueError, state)
     state.wavelength_step_type = RangeStepType.Lin
     assert_raises_nothing(self, state)