Esempio n. 1
0
 def _set_door_name(self, door):
     if door:
         full_door_tg_name, door_tg_name, door_tg_alias = (
             from_name_to_tango(door))
         door_alias = door_tg_alias or door_tg_name
         self._door_name = full_door_tg_name
         self._door_alias = door_alias
     else:
         self._door_name = None
         self._door_alias = None
Esempio n. 2
0
 def _set_macro_server_name(self, door):
     if door:
         macro_server = get_macroserver_for_door(door)
         full_ms_tg_name, ms_tg_name, ms_tg_alias = (
             from_name_to_tango(macro_server))
         ms_alias = ms_tg_alias or ms_tg_name
         self._macro_server_name = full_ms_tg_name
         self._macro_server_alias = ms_alias
     else:
         self._macro_server_name = None
         self._macro_server_alias = None
Esempio n. 3
0
    def test_spock_prompt(self):
        full_name, name, alias = from_name_to_tango(UNITTEST_DOOR_NAME)
        alias = alias or name

        def predicate():
            text = self.widget._control.toPlainText()
            matches = re.findall(r"^{}.*\[(\d)\]".format(alias), text,
                                 re.MULTILINE)
            return len(matches) == 1 and matches[0] == "1"

        self.assertTrue(waitFor(predicate, 10000))