From 4c7fa599c6fbd8f57ecb2b13d0c69f881d3a1058 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 4 Jan 2014 08:28:45 +0000 Subject: [PATCH] Add app to test --- tests/interfaces/openlp_core_ui/test_thememanager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/interfaces/openlp_core_ui/test_thememanager.py b/tests/interfaces/openlp_core_ui/test_thememanager.py index 73e5b63fa..17a22f215 100644 --- a/tests/interfaces/openlp_core_ui/test_thememanager.py +++ b/tests/interfaces/openlp_core_ui/test_thememanager.py @@ -33,6 +33,8 @@ import os from unittest import TestCase from tempfile import mkstemp +from PyQt4 import QtGui + from openlp.core.common import Registry, Settings from openlp.core.ui import ThemeManager from tests.functional import patch, MagicMock @@ -48,16 +50,17 @@ class TestThemeManager(TestCase): """ fd, self.ini_file = mkstemp('.ini') Settings().set_filename(self.ini_file) + self.app = QtGui.QApplication([]) Registry.create() self.theme_manager = ThemeManager() - def tearDown(self): """ Delete all the C++ objects at the end so that we don't have a segfault """ os.unlink(self.ini_file) os.unlink(Settings().fileName()) + del self.app def initialise_test(self): """