forked from openlp/openlp
Fix up the openlp_core_ui tests so that they run and they don't segfault at the end
This commit is contained in:
parent
4e2ea75962
commit
ac795d8439
0
tests/functional/openlp_core_ui/__init__.py
Normal file
0
tests/functional/openlp_core_ui/__init__.py
Normal file
@ -2,9 +2,10 @@
|
|||||||
Package to test the openlp.core.ui package.
|
Package to test the openlp.core.ui package.
|
||||||
"""
|
"""
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from mock import MagicMock
|
from mock import MagicMock
|
||||||
|
|
||||||
from openlp.core.ui import starttimeform
|
from openlp.core.ui import starttimeform
|
||||||
from PyQt4 import QtCore, QtGui, QtTest
|
from PyQt4 import QtCore, QtGui, QtTest
|
||||||
|
|
||||||
@ -14,10 +15,15 @@ class TestStartTimeDialog(TestCase):
|
|||||||
"""
|
"""
|
||||||
Create the UI
|
Create the UI
|
||||||
"""
|
"""
|
||||||
self.app = QtGui.QApplication(sys.argv)
|
self.app = QtGui.QApplication([])
|
||||||
self.window = QtGui.QMainWindow()
|
self.window = QtGui.QMainWindow()
|
||||||
self.form = starttimeform.StartTimeForm(self.window)
|
self.form = starttimeform.StartTimeForm(self.window)
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
del self.form
|
||||||
|
del self.window
|
||||||
|
del self.app
|
||||||
|
|
||||||
def ui_defaults_test(self):
|
def ui_defaults_test(self):
|
||||||
"""
|
"""
|
||||||
Test StartTimeDialog defaults
|
Test StartTimeDialog defaults
|
||||||
|
Loading…
Reference in New Issue
Block a user