Go back to deleting everything, as it seems to yield the best result

This commit is contained in:
Raoul Snyman 2014-11-27 01:34:48 +02:00
parent d28e838fa6
commit 049ca7e9d2
18 changed files with 35 additions and 30 deletions

View File

@ -42,6 +42,9 @@ from tests.interfaces import MagicMock, patch
class TestHistoryComboBox(TestCase, TestMixin):
def setUp(self):
"""
Some pre-test setup required.
"""
Registry.create()
self.setup_application()
self.main_window = QtGui.QMainWindow()
@ -49,9 +52,11 @@ class TestHistoryComboBox(TestCase, TestMixin):
self.combo = HistoryComboBox(self.main_window)
def tearDown(self):
# del self.combo
# del self.main_window
pass
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
del self.combo
del self.main_window
def get_items_test(self):
"""

View File

@ -63,9 +63,9 @@ class TestPluginManager(TestCase, TestMixin):
Registry().register('main_window', self.main_window)
def tearDown(self):
# del self.main_window
Settings().remove('advanced/data path')
self.destroy_settings()
del self.main_window
# On windows we need to manually garbage collect to close sqlalchemy files
# to avoid errors when temporary files are deleted.
gc.collect()

View File

@ -73,8 +73,8 @@ class TestSearchEdit(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.search_edit
# del self.main_window
del self.search_edit
del self.main_window
def set_search_types_test(self):
"""

View File

@ -55,8 +55,8 @@ class TestStartFileRenameForm(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.form
# del self.main_window
del self.form
del self.main_window
def window_title_test(self):
"""

View File

@ -61,8 +61,8 @@ class TestListPreviewWidget(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault.
"""
# del self.preview_widget
# del self.main_window
del self.preview_widget
del self.main_window
def initial_slide_count_test(self):
"""

View File

@ -70,7 +70,7 @@ class TestMainWindow(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.main_window
del self.main_window
def restore_current_media_manager_item_test(self):
"""

View File

@ -70,8 +70,8 @@ class TestProjectorManager(TestCase, TestMixin):
Delete all the C++ objects at the end so that we don't have a segfault.
"""
self.projectordb.session.close()
#del self.projector_manager
self.destroy_settings()
del self.projector_manager
def bootstrap_initialise_test(self):
"""

View File

@ -57,8 +57,8 @@ class TestServiceManager(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.service_manager
# del self.main_window
del self.service_manager
del self.main_window
def basic_service_manager_test(self):
"""

View File

@ -55,8 +55,8 @@ class TestStartNoteDialog(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.form
# del self.main_window
del self.form
del self.main_window
def basic_display_test(self):
"""

View File

@ -71,7 +71,7 @@ class TestSettingsForm(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.form
del self.form
def basic_cancel_test(self):
"""

View File

@ -55,8 +55,8 @@ class TestShortcutform(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.form
# del self.main_window
del self.form
del self.main_window
def adjust_button_test(self):
"""

View File

@ -55,8 +55,8 @@ class TestStartTimeDialog(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.form
# del self.main_window
del self.form
del self.main_window
def ui_defaults_test(self):
"""

View File

@ -54,8 +54,8 @@ class TestThemeManager(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.theme_manager
self.destroy_settings()
del self.theme_manager
def initialise_test(self):
"""

View File

@ -73,7 +73,7 @@ class TestBibleManager(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.manager
del self.manager
self.destroy_settings()
def get_books_test(self):

View File

@ -73,7 +73,7 @@ class TestBibleManager(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.manager
del self.manager
self.destroy_settings()
def parse_reference_one_test(self):

View File

@ -61,8 +61,8 @@ class TestEditCustomForm(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.form
# del self.main_window
del self.form
del self.main_window
def load_themes_test(self):
"""

View File

@ -57,8 +57,8 @@ class TestEditCustomSlideForm(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.form
# del self.main_window
del self.form
del self.main_window
def basic_test(self):
"""

View File

@ -76,9 +76,9 @@ class TestMediaClipSelectorForm(TestCase, TestMixin):
"""
Delete all the C++ objects at the end so that we don't have a segfault
"""
# del self.form
del self.form
self.vlc_patcher.stop()
# del self.main_window
del self.main_window
def basic_test(self):
"""