Пример #1
0
 def tearDownClass(cls):
     gc.collect()
     cls.app.setApplicationName(cls.__appname)
     cls.app.setOrganizationDomain(cls.__appdomain)
     cls.app = None
     super(QCoreAppTestCase, cls).tearDownClass()
     QStandardPaths.setTestModeEnabled(False)
Пример #2
0
 def tearDownClass(cls):
     gc.collect()
     cls.app.setApplicationName(cls.__appname)
     cls.app.setOrganizationDomain(cls.__appdomain)
     cls.app.sendPostedEvents(None, 0)
     # Keep app instance alive between tests with PyQt5 5.14.0 and later
     if PYQT_VERSION <= 0x050e00:
         cls.app = None
     super(QCoreAppTestCase, cls).tearDownClass()
     QStandardPaths.setTestModeEnabled(False)
Пример #3
0
 def setUpClass(cls):
     super(QCoreAppTestCase, cls).setUpClass()
     QStandardPaths.setTestModeEnabled(True)
     app = cls._AppClass.instance()
     if app is None:
         app = cls._AppClass([])
     cls.app = app
     cls.__appname = cls.app.applicationName()
     cls.__appdomain = cls.app.organizationDomain()
     cls.app.setApplicationName("orangecanvas.testing")
     cls.app.setOrganizationDomain("biolab.si")
Пример #4
0
 def setUp(self) -> None:
     super().setUp()
     QStandardPaths.setTestModeEnabled(True)
     QSettings.setDefaultFormat(QSettings.IniFormat)
Пример #5
0
 def tearDown(self) -> None:
     QStandardPaths.setTestModeEnabled(False)
     QSettings.setDefaultFormat(QSettings.NativeFormat)
     super().tearDown()