forked from openlp/openlp
cleaned code
This commit is contained in:
parent
479244fde2
commit
bea5fe2596
@ -6,3 +6,8 @@ sip.setapi(u'QTextStream', 2)
|
||||
sip.setapi(u'QTime', 2)
|
||||
sip.setapi(u'QUrl', 2)
|
||||
sip.setapi(u'QVariant', 2)
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
# Only one QApplication can be created. Use QtGui.QApplication.instance() when you need to "create" a QApplication.
|
||||
application = QtGui.QApplication([])
|
||||
|
@ -20,10 +20,16 @@ class TestImageManager(TestCase):
|
||||
Create the UI
|
||||
"""
|
||||
Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
ScreenList.create(self.app.desktop())
|
||||
self.image_manager = ImageManager()
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
Delete all the C++ objects at the end so that we don't have a segfault
|
||||
"""
|
||||
del self.app
|
||||
|
||||
def basic_image_manager_test(self):
|
||||
"""
|
||||
Test the Image Manager setup basic functionality
|
||||
|
@ -19,6 +19,11 @@ class TestScreenList(TestCase):
|
||||
self.application = QtGui.QApplication.instance()
|
||||
self.screens = ScreenList.create(self.application.desktop())
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
"""
|
||||
del self.application
|
||||
|
||||
def add_desktop_test(self):
|
||||
"""
|
||||
Test to check if new monitors are detected by OpenLP (= plugged in while OpenLP is running).
|
||||
|
@ -15,7 +15,7 @@ class TestStartFileRenameForm(TestCase):
|
||||
Create the UI
|
||||
"""
|
||||
registry = Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
self.main_window = QtGui.QMainWindow()
|
||||
Registry().register(u'main_window', self.main_window)
|
||||
self.form = filerenameform.FileRenameForm()
|
||||
|
@ -18,7 +18,7 @@ class TestStartNoteDialog(TestCase):
|
||||
Create the UI
|
||||
"""
|
||||
Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
ScreenList.create(self.app.desktop())
|
||||
Registry().register(u'application', MagicMock())
|
||||
self.main_window = MainWindow()
|
||||
|
@ -17,7 +17,7 @@ class TestStartNoteDialog(TestCase):
|
||||
Create the UI
|
||||
"""
|
||||
Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
self.main_window = QtGui.QMainWindow()
|
||||
Registry().register(u'main_window', self.main_window)
|
||||
self.form = servicenoteform.ServiceNoteForm()
|
||||
|
@ -17,7 +17,7 @@ class TestStartTimeDialog(TestCase):
|
||||
Create the UI
|
||||
"""
|
||||
Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
self.main_window = QtGui.QMainWindow()
|
||||
Registry().register(u'main_window', self.main_window)
|
||||
self.form = starttimeform.StartTimeForm()
|
||||
|
Loading…
Reference in New Issue
Block a user