コード例 #1
0
    def activate_input_engine_or_skip(self, engine_name):
        """Activate the input engine 'engine_name', or skip the test if the
        engine name is not avaialble (probably because it's not been installed).

        """
        available_engines = get_available_input_engines()
        if engine_name in available_engines:
            if get_active_input_engines() != [engine_name]:
                IBusTests._old_engines = set_active_engines([engine_name])
        else:
            self.skip("This test requires the '%s' engine to be installed." % (engine_name))
コード例 #2
0
    def activate_input_engine_or_skip(self, engine_name):
        """Activate the input engine 'engine_name', or skip the test if the
        engine name is not avaialble (probably because it's not been installed).

        """
        available_engines = get_available_input_engines()
        if engine_name in available_engines:
            if get_active_input_engines() != [engine_name]:
                IBusTests._old_engines = set_active_engines([engine_name])
        else:
            self.skip("This test requires the '%s' engine to be installed." %
                      (engine_name))
コード例 #3
0
 def tearDownClass(cls):
     if cls._old_engines is not None:
         set_active_engines(cls._old_engines)
     bus = get_ibus_bus()
     bus.exit(restart=True)
コード例 #4
0
 def tearDownClass(cls):
     if cls._old_engines is not None:
         set_active_engines(cls._old_engines)
     bus = get_ibus_bus()
     bus.exit(restart=True)