mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 13:19:00 +08:00
ExtruderStack requires a next stack, so make sure it has that in tests
This commit is contained in:
parent
d29ae60d38
commit
0c232c9462
@ -263,6 +263,7 @@ def test_getPropertyFallThrough(extruder_stack):
|
||||
extruder_stack.variant = mock_no_settings[container_indices.Variant]
|
||||
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
|
||||
extruder_stack.definition = mock_layer_heights[container_indices.Definition] #There's a layer height in here!
|
||||
extruder_stack.setNextStack(unittest.mock.MagicMock())
|
||||
|
||||
assert extruder_stack.getProperty("layer_height", "value") == container_indices.Definition
|
||||
extruder_stack.variant = mock_layer_heights[container_indices.Variant]
|
||||
@ -382,4 +383,4 @@ def test_setVariantByIdExists(extruder_stack, container_registry):
|
||||
## Tests setting variants by specifying an ID of a variant that doesn't exist.
|
||||
def test_setVariantByIdDoesntExist(extruder_stack):
|
||||
with pytest.raises(InvalidContainerError):
|
||||
extruder_stack.setVariantById("some_variant") #Container registry is empty now.
|
||||
extruder_stack.setVariantById("some_variant") #Container registry is empty now.
|
||||
|
Loading…
x
Reference in New Issue
Block a user