def run(self): """Run getting of missing keyboard settings. :returns: tuple of X layouts and VC keyboard settings :rtype: (list(str), str)) """ return get_missing_keyboard_configuration(self._localed_wrapper, self._x_layouts, self._vc_keymap)
def _get_missing_keyboard_configuration_test( self, x_layouts, converted_x_layouts, vc_keymap, converted_vc_keymap, result_x_layouts, result_vc_keymap): localed = Mock() localed.convert_keymap.return_value = converted_vc_keymap localed.convert_layouts.return_value = converted_x_layouts result = get_missing_keyboard_configuration(localed, x_layouts, vc_keymap) assert result == (result_x_layouts, result_vc_keymap)
def run(self): x_layouts = self._x_layouts vc_keymap = self._vc_keymap if not self._x_layouts or not self._vc_keymap: x_layouts, vc_keymap = get_missing_keyboard_configuration( self._localed_wrapper, self._x_layouts, self._vc_keymap) if x_layouts: write_x_configuration(self._localed_wrapper, x_layouts, self._switch_options, X_CONF_DIR, self._sysroot) if vc_keymap: write_vc_configuration(vc_keymap, self._sysroot)