Browse Source

Don't modify ContainerStack._containerRegistry property

We do not use it in GlobalStack
Arjen Hiemstra 8 years ago
parent
commit
270cdd08cb
1 changed files with 0 additions and 36 deletions
  1. 0 36
      tests/Settings/TestGlobalStack.py

+ 0 - 36
tests/Settings/TestGlobalStack.py

@@ -441,14 +441,8 @@ def test_removeContainer(global_stack):
 
 ##  Tests setting definitions by specifying an ID of a definition that exists.
 def test_setDefinitionByIdExists(global_stack, container_registry):
-    original_container_registry = UM.Settings.ContainerStack._containerRegistry
-    UM.Settings.ContainerStack._containerRegistry = container_registry #Always has all the profiles you ask of.
-
     global_stack.setDefinitionById("some_definition") #The container registry always has a container with the ID.
 
-    #Restore.
-    UM.Settings.ContainerStack._containerRegistry = original_container_registry
-
 ##  Tests setting definitions by specifying an ID of a definition that doesn't
 #   exist.
 def test_setDefinitionByIdDoesntExist(global_stack):
@@ -458,14 +452,8 @@ def test_setDefinitionByIdDoesntExist(global_stack):
 ##  Tests setting definition changes by specifying an ID of a container that
 #   exists.
 def test_setDefinitionChangesByIdExists(global_stack, container_registry):
-    original_container_registry = UM.Settings.ContainerStack._containerRegistry
-    UM.Settings.ContainerStack._containerRegistry = container_registry #Always has all the profiles you ask of.
-
     global_stack.setDefinitionChangesById("some_definition_changes") #The container registry always has a container with the ID.
 
-    #Restore.
-    UM.Settings.ContainerStack._containerRegistry = original_container_registry
-
 ##  Tests setting definition changes by specifying an ID of a container that
 #   doesn't exist.
 def test_setDefinitionChangesByIdDoesntExist(global_stack):
@@ -474,14 +462,8 @@ def test_setDefinitionChangesByIdDoesntExist(global_stack):
 
 ##  Tests setting materials by specifying an ID of a material that exists.
 def test_setMaterialByIdExists(global_stack, container_registry):
-    original_container_registry = UM.Settings.ContainerStack._containerRegistry
-    UM.Settings.ContainerStack._containerRegistry = container_registry #Always has all the profiles you ask of.
-
     global_stack.setMaterialById("some_material") #The container registry always has a container with the ID.
 
-    #Restore.
-    UM.Settings.ContainerStack._containerRegistry = original_container_registry
-
 ##  Tests setting materials by specifying an ID of a material that doesn't
 #   exist.
 def test_setMaterialByIdDoesntExist(global_stack):
@@ -536,14 +518,8 @@ def test_setPropertyOtherContainers(target_container, global_stack):
 
 ##  Tests setting qualities by specifying an ID of a quality that exists.
 def test_setQualityByIdExists(global_stack, container_registry):
-    original_container_registry = UM.Settings.ContainerStack._containerRegistry
-    UM.Settings.ContainerStack._containerRegistry = container_registry #Always has all the profiles you ask of.
-
     global_stack.setQualityById("some_quality") #The container registry always has a container with the ID.
 
-    #Restore.
-    UM.Settings.ContainerStack._containerRegistry = original_container_registry
-
 ##  Tests setting qualities by specifying an ID of a quality that doesn't exist.
 def test_setQualityByIdDoesntExist(global_stack):
     with pytest.raises(KeyError):
@@ -552,14 +528,8 @@ def test_setQualityByIdDoesntExist(global_stack):
 ##  Tests setting quality changes by specifying an ID of a quality change that
 #   exists.
 def test_setQualityChangesByIdExists(global_stack, container_registry):
-    original_container_registry = UM.Settings.ContainerStack._containerRegistry
-    UM.Settings.ContainerStack._containerRegistry = container_registry #Always has all the profiles you ask of.
-
     global_stack.setQualityChangesById("some_quality_changes") #The container registry always has a container with the ID.
 
-    #Restore.
-    UM.Settings.ContainerStack._containerRegistry = original_container_registry
-
 ##  Tests setting quality changes by specifying an ID of a quality change that
 #   doesn't exist.
 def test_setQualityChangesByIdDoesntExist(global_stack):
@@ -568,14 +538,8 @@ def test_setQualityChangesByIdDoesntExist(global_stack):
 
 ##  Tests setting variants by specifying an ID of a variant that exists.
 def test_setVariantByIdExists(global_stack, container_registry):
-    original_container_registry = UM.Settings.ContainerStack._containerRegistry
-    UM.Settings.ContainerStack._containerRegistry = container_registry #Always has all the profiles you ask of.
-
     global_stack.setVariantById("some_variant") #The container registry always has a container with the ID.
 
-    #Restore.
-    UM.Settings.ContainerStack._containerRegistry = original_container_registry
-
 ##  Tests setting variants by specifying an ID of a variant that doesn't exist.
 def test_setVariantByIdDoesntExist(global_stack):
     with pytest.raises(KeyError):