Пример #1
0
 def setUp(self):
     super(PreferencesShortcutManagerConfigurationTestCase, self).setUp()
     self.settings = gui.FakeQSettings()
     self.patch(shortcut_manager, 'QSettings', lambda: self.settings)
     self.patch(resources, 'QSettings', lambda: self.settings)
     # Test data
     custom_default_data = {"New-file": QKeySequence(Qt.CTRL + Qt.Key_N)}
     # patch shortcuts with test data
     self.patch(resources, 'CUSTOM_SHORTCUTS', custom_default_data)
     self.shortcuts_manager = shortcut_manager.ShortcutConfiguration()
Пример #2
0
 def setUp(self):
     super(PreferencesEditorConfigurationTestCase, self).setUp()
     self.app = QApplication(sys.argv)
     self.settings = gui.FakeQSettings()
     self.patch(preferences, 'QSettings', lambda: self.settings)
     self.editor_completion = preferences.EditorConfiguration()