diff --git a/tests/functional/openlp_core_common/test_settings.py b/tests/functional/openlp_core_common/test_settings.py index 7fd49f755..304281c31 100644 --- a/tests/functional/openlp_core_common/test_settings.py +++ b/tests/functional/openlp_core_common/test_settings.py @@ -46,6 +46,7 @@ class TestSettings(TestCase): """ Create the UI """ + Settings.setDefaultFormat(Settings.IniFormat) fd, self.ini_file = mkstemp('.ini') Settings().set_filename(self.ini_file) self.application = QtGui.QApplication.instance() @@ -55,7 +56,6 @@ class TestSettings(TestCase): Delete all the C++ objects at the end so that we don't have a segfault """ del self.application - os.unlink(self.ini_file) os.unlink(Settings().fileName()) def settings_basic_test(self): diff --git a/tests/functional/openlp_core_utils/test_actions.py b/tests/functional/openlp_core_utils/test_actions.py index 5fb7a3aee..f44ddfafd 100644 --- a/tests/functional/openlp_core_utils/test_actions.py +++ b/tests/functional/openlp_core_utils/test_actions.py @@ -59,7 +59,7 @@ class TestActionList(TestCase): Clean up """ self.settings.endGroup() - os.unlink(self.ini_file) + os.unlink(Settings().fileName()) def test_add_action_same_parent(self): """ diff --git a/tests/functional/openlp_plugins/presentations/test_pdfcontroller.py b/tests/functional/openlp_plugins/presentations/test_pdfcontroller.py index 6dba4ac90..d426c7af2 100644 --- a/tests/functional/openlp_plugins/presentations/test_pdfcontroller.py +++ b/tests/functional/openlp_plugins/presentations/test_pdfcontroller.py @@ -55,6 +55,7 @@ class TestPdfController(TestCase): """ Set up the components need for all tests. """ + Settings.setDefaultFormat(Settings.IniFormat) self.fd, self.ini_file = mkstemp('.ini') Settings().set_filename(self.ini_file) self.application = QtGui.QApplication.instance() @@ -69,7 +70,7 @@ class TestPdfController(TestCase): """ del self.application try: - os.unlink(self.ini_file) + os.unlink(Settings().fileName()) shutil.rmtree(self.thumbnail_folder) shutil.rmtree(self.temp_folder) except OSError: diff --git a/tests/functional/openlp_plugins/remotes/test_remotetab.py b/tests/functional/openlp_plugins/remotes/test_remotetab.py index 44b719d95..ca965d234 100644 --- a/tests/functional/openlp_plugins/remotes/test_remotetab.py +++ b/tests/functional/openlp_plugins/remotes/test_remotetab.py @@ -62,6 +62,7 @@ class TestRemoteTab(TestCase): """ Create the UI """ + Settings.setDefaultFormat(Settings.IniFormat) self.fd, self.ini_file = mkstemp('.ini') Settings().set_filename(self.ini_file) self.application = QtGui.QApplication.instance() @@ -77,7 +78,7 @@ class TestRemoteTab(TestCase): del self.parent del self.form os.close(self.fd) - os.unlink(self.ini_file) + os.unlink(Settings().fileName()) def get_ip_address_default_test(self): """ diff --git a/tests/functional/openlp_plugins/remotes/test_router.py b/tests/functional/openlp_plugins/remotes/test_router.py index 7f42a8cad..a1c9936c1 100644 --- a/tests/functional/openlp_plugins/remotes/test_router.py +++ b/tests/functional/openlp_plugins/remotes/test_router.py @@ -61,6 +61,7 @@ class TestRouter(TestCase): """ Create the UI """ + Settings.setDefaultFormat(Settings.IniFormat) self.fd, self.ini_file = mkstemp('.ini') Settings().set_filename(self.ini_file) self.application = QtGui.QApplication.instance() @@ -73,7 +74,7 @@ class TestRouter(TestCase): """ del self.application os.close(self.fd) - os.unlink(self.ini_file) + os.unlink(Settings().fileName()) def password_encrypter_test(self): """ diff --git a/tests/functional/openlp_plugins/songs/test_mediaitem.py b/tests/functional/openlp_plugins/songs/test_mediaitem.py index a823c230e..7113c2c6c 100644 --- a/tests/functional/openlp_plugins/songs/test_mediaitem.py +++ b/tests/functional/openlp_plugins/songs/test_mediaitem.py @@ -28,6 +28,7 @@ class TestMediaItem(TestCase): patch('openlp.plugins.songs.forms.editsongform.EditSongForm.__init__'): self.media_item = SongMediaItem(None, MagicMock()) + Settings.setDefaultFormat(Settings.IniFormat) fd, self.ini_file = mkstemp('.ini') Settings().set_filename(self.ini_file) self.application = QtGui.QApplication.instance() @@ -40,7 +41,6 @@ class TestMediaItem(TestCase): del self.application # Not all tests use settings! try: - os.unlink(self.ini_file) os.unlink(Settings().fileName()) except Exception: pass diff --git a/tests/interfaces/openlp_core_lib/test_pluginmanager.py b/tests/interfaces/openlp_core_lib/test_pluginmanager.py index 9e8dc534b..4981d8cfa 100644 --- a/tests/interfaces/openlp_core_lib/test_pluginmanager.py +++ b/tests/interfaces/openlp_core_lib/test_pluginmanager.py @@ -23,6 +23,7 @@ class TestPluginManager(TestCase): """ Some pre-test setup required. """ + Settings.setDefaultFormat(Settings.IniFormat) fd, self.ini_file = mkstemp('.ini') self.temp_dir = mkdtemp('openlp') Settings().set_filename(self.ini_file) @@ -38,7 +39,7 @@ class TestPluginManager(TestCase): del self.main_window Settings().remove('advanced/data path') shutil.rmtree(self.temp_dir) - os.unlink(self.ini_file) + os.unlink(Settings().fileName()) def find_plugins_test(self): """ diff --git a/tests/interfaces/openlp_core_ui/test_thememanager.py b/tests/interfaces/openlp_core_ui/test_thememanager.py index 17a22f215..bc9473c54 100644 --- a/tests/interfaces/openlp_core_ui/test_thememanager.py +++ b/tests/interfaces/openlp_core_ui/test_thememanager.py @@ -48,6 +48,7 @@ class TestThemeManager(TestCase): """ Create the UI """ + Settings.setDefaultFormat(Settings.IniFormat) fd, self.ini_file = mkstemp('.ini') Settings().set_filename(self.ini_file) self.app = QtGui.QApplication([]) @@ -58,7 +59,6 @@ class TestThemeManager(TestCase): """ 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