def _init_modules(self): """Initialize all 'modules' which need to be initialized.""" log.init.debug("Initializing readline-bridge...") readline_bridge = readline.ReadlineBridge() objreg.register('readline-bridge', readline_bridge) log.init.debug("Initializing directories...") standarddir.init() log.init.debug("Initializing config...") config.init(self._args) log.init.debug("Initializing crashlog...") self._handle_segfault() log.init.debug("Initializing websettings...") websettings.init() log.init.debug("Initializing quickmarks...") quickmark_manager = quickmarks.QuickmarkManager() objreg.register('quickmark-manager', quickmark_manager) log.init.debug("Initializing proxy...") proxy.init() log.init.debug("Initializing cookies...") cookie_jar = cookies.CookieJar(self) objreg.register('cookie-jar', cookie_jar) log.init.debug("Initializing cache...") diskcache = cache.DiskCache(self) objreg.register('cache', diskcache) log.init.debug("Initializing main window...") win_id = mainwindow.MainWindow.spawn( False if self._args.nowindow else True) main_window = objreg.get('main-window', scope='window', window=win_id) self.setActiveWindow(main_window)
def setUp(self): self.qle = mock.Mock() self.qle.__class__ = QLineEdit readline.QApplication.focusWidget = mock.Mock(return_value=self.qle) self.bridge = readline.ReadlineBridge()
def setUp(self): readline.QApplication = stubs.FakeQApplication() readline.QApplication.focusWidget = mock.Mock(return_value=None) self.bridge = readline.ReadlineBridge()