forked from openlp/openlp
for fixes
This commit is contained in:
parent
6780c64855
commit
9a9ee4bafd
@ -22,7 +22,6 @@
|
||||
"""
|
||||
Package to test the openlp.core.lib.pluginmanager package.
|
||||
"""
|
||||
import gc
|
||||
import sys
|
||||
from tempfile import mkdtemp
|
||||
from unittest import TestCase
|
||||
@ -30,6 +29,7 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common import is_win
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
@ -61,6 +61,8 @@ class TestPluginManager(TestCase, TestMixin):
|
||||
del self.main_window
|
||||
# On windows we need to manually garbage collect to close sqlalchemy files
|
||||
# to avoid errors when temporary files are deleted.
|
||||
if is_win():
|
||||
import gc
|
||||
gc.collect()
|
||||
self.temp_dir_path.rmtree()
|
||||
|
||||
@ -76,7 +78,7 @@ class TestPluginManager(TestCase, TestMixin):
|
||||
"""
|
||||
# GIVEN: A plugin manager
|
||||
plugin_manager = PluginManager()
|
||||
plugin_manager.bootstrap_initialise()
|
||||
# plugin_manager.bootstrap_initialise()
|
||||
|
||||
# WHEN: We mock out sys.platform to make it return "darwin" and then find the plugins
|
||||
old_platform = sys.platform
|
||||
|
Loading…
Reference in New Issue
Block a user