def component(self, value): # There are two types of values that can be passed: # String: we look for string and we set it # Convert the value to the correct GUI string # Set the correct selection of reduction modes which are available component_list = get_detector_strings_for_gui(self.instrument) self.set_component_options(component_list) component_as_string = get_string_for_gui_from_reduction_mode(value, self.instrument) if component_as_string: index = self.reduction_mode_combo_box.findText(component_as_string) if index != -1: self.component_combo_box.setCurrentIndex(index)
def component(self, value): # There are two types of values that can be passed: # String: we look for string and we set it # Convert the value to the correct GUI string # Set the correct selection of reduction modes which are available component_list = get_detector_strings_for_gui(self.instrument) self.set_component_options(component_list) component_as_string = get_string_for_gui_from_reduction_mode(value, self.instrument) if component_as_string: index = self.reduction_mode_combo_box.findText(component_as_string) if index != -1: self.component_combo_box.setCurrentIndex(index)
def run_reduction_mode_string_case(self, instrument, reduction_mode, reduction_mode_string): setting = get_string_for_gui_from_reduction_mode( reduction_mode, instrument) self.assertEqual(setting, reduction_mode_string)
def do_test_reduction_mode_string(self, instrument, reduction_mode, reduction_mode_string): setting = get_string_for_gui_from_reduction_mode( reduction_mode, instrument) self.assertTrue(setting == reduction_mode_string)
def do_test_reduction_mode_string(self, instrument, reduction_mode, reduction_mode_string): setting = get_string_for_gui_from_reduction_mode(reduction_mode, instrument) self.assertTrue(setting == reduction_mode_string)