mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Add test for missing containers in container stack
This seems to give a different exception than intended at the moment. Contributes to issue CURA-3497.
This commit is contained in:
parent
f579b5f304
commit
a95404f72f
1 changed files with 9 additions and 0 deletions
|
@ -215,6 +215,15 @@ def test_deserializeDefinition(filename, definition_id, container_registry, glob
|
||||||
#Restore.
|
#Restore.
|
||||||
UM.Settings.ContainerStack._containerRegistry = original_container_registry
|
UM.Settings.ContainerStack._containerRegistry = original_container_registry
|
||||||
|
|
||||||
|
def test_deserializeMissingContainer(container_registry, global_stack):
|
||||||
|
serialized = readStack("Global.global.cfg")
|
||||||
|
try:
|
||||||
|
global_stack.deserialize(serialized)
|
||||||
|
except Exception as e:
|
||||||
|
#Must be exactly Exception, not one of its subclasses, since that is what gets raised when a stack has an unknown container.
|
||||||
|
#That's why we can't use pytest.raises.
|
||||||
|
assert type(e) == Exception
|
||||||
|
|
||||||
## Tests whether the hasUserValue returns true for settings that are changed in
|
## Tests whether the hasUserValue returns true for settings that are changed in
|
||||||
# the user-changes container.
|
# the user-changes container.
|
||||||
def test_hasUserValueUserChanges(global_stack):
|
def test_hasUserValueUserChanges(global_stack):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue