mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
Fix some unit tests.
Add fixtures to the conftest file and clean-up the code a bit. Contributes to CURA-5628
This commit is contained in:
parent
be021b8fac
commit
db7f1242cd
8 changed files with 118 additions and 134 deletions
19
tests/Settings/conftest.py
Normal file
19
tests/Settings/conftest.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Uranium 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 settings tests.
|
||||
|
||||
import pytest
|
||||
import copy
|
||||
|
||||
from UM.Settings.DefinitionContainer import DefinitionContainer #To provide definition containers in the registry fixtures.
|
||||
|
||||
# Returns the CuraContainerRegistry instance with some empty containers.
|
||||
@pytest.fixture()
|
||||
def container_registry(application):
|
||||
return application.getContainerRegistry()
|
||||
|
||||
# Gives an arbitrary definition container.
|
||||
@pytest.fixture()
|
||||
def definition_container():
|
||||
return DefinitionContainer(container_id = "Test Definition")
|
Loading…
Add table
Add a link
Reference in a new issue