mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
Fix global stack tests.
Contributes to CURA-5628.
This commit is contained in:
parent
c8af4f45ce
commit
1364370ede
3 changed files with 50 additions and 111 deletions
|
@ -4,7 +4,7 @@
|
|||
# The purpose of this class is to create fixtures or methods that can be shared among all tests.
|
||||
|
||||
import pytest
|
||||
from UM.Qt.QtApplication import QtApplication #QTApplication import is required, even though it isn't used.
|
||||
from UM.Qt.QtApplication import QtApplication #QtApplication import is required, even though it isn't used.
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.MachineActionManager import MachineActionManager
|
||||
|
||||
|
@ -15,24 +15,9 @@ def application() -> CuraApplication:
|
|||
application = CuraApplication.getInstance()
|
||||
if application is None:
|
||||
application = CuraApplication()
|
||||
application.initialize()
|
||||
return application
|
||||
|
||||
# Returns a MachineActionManager instance.
|
||||
@pytest.fixture()
|
||||
def machine_action_manager(application) -> MachineActionManager:
|
||||
return application.getMachineActionManager()
|
||||
|
||||
# @pytest.fixture()
|
||||
# def plugin_registry(application):
|
||||
# PluginRegistry._PluginRegistry__instance = None
|
||||
# plugin_registry = PluginRegistry(application)
|
||||
# plugin_registry._plugin_locations = [] # Clear pre-defined plugin locations
|
||||
# return plugin_registry
|
||||
#
|
||||
# @pytest.fixture()
|
||||
# def upgrade_manager(application):
|
||||
# VersionUpgradeManager._VersionUpgradeManager__instance = None
|
||||
# upgrade_manager = VersionUpgradeManager(application)
|
||||
# return upgrade_manager
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue