mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00

Delete a test that needs a ContainerProvider. We need to discuss if we want to add it back, depending if we are still keeping the providers. Contributes to CURA-5628.
23 lines
1,008 B
Python
23 lines
1,008 B
Python
# Copyright (c) 2018 Ultimaker B.V.
|
|
# Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
# 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 cura.CuraApplication import CuraApplication
|
|
from cura.MachineActionManager import MachineActionManager
|
|
|
|
# Create a CuraApplication object that will be shared among all tests. It needs to be initialized.
|
|
# Since we need to use it more that once, we create the application the first time and use its instance afterwards.
|
|
@pytest.fixture()
|
|
def application() -> CuraApplication:
|
|
application = CuraApplication.getInstance()
|
|
if application is None:
|
|
application = CuraApplication()
|
|
return application
|
|
|
|
# Returns a MachineActionManager instance.
|
|
@pytest.fixture()
|
|
def machine_action_manager(application) -> MachineActionManager:
|
|
return MachineActionManager(application)
|