I'm updating the Fedora package to 3.0.3, however the tests are failing (once again, after thay have been failing in 2.6 and fixed in 2.7). Does this indicate something wrong with the packaging, or are the tests failing for you as well?
+ /usr/bin/python3 -m pip freeze
numpy==1.13.3
py==1.4.34
pytest==3.2.3
scipy==0.19.1
+ /usr/bin/python3 -m pytest -v
============================= test session starts ==============================
platform linux -- Python 3.6.3, pytest-3.2.3, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python3
cachedir: .cache
rootdir: /builddir/build/BUILD/Cura-3.0.3, inifile: pytest.ini
collecting ... collected 170 items
tests/TestArrange.py::test_smoke_arrange PASSED
tests/TestArrange.py::test_smoke_ShapeArray PASSED
tests/TestArrange.py::test_centerFirst PASSED
tests/TestArrange.py::test_backFirst PASSED
tests/TestArrange.py::test_smoke_bestSpot PASSED
tests/TestArrange.py::test_smoke_place PASSED
tests/TestArrange.py::test_checkShape PASSED
tests/TestArrange.py::test_checkShape_place PASSED
tests/TestArrange.py::test_smoke_place_objects PASSED
tests/TestArrange.py::test_arrayFromPolygon PASSED
tests/TestArrange.py::test_arrayFromPolygon2 PASSED
tests/TestArrange.py::test_check PASSED
tests/TestArrange.py::test_check2 PASSED
tests/TestMachineAction.py::test_addMachineAction PASSED
tests/TestProfileRequirements.py::test_ultimaker3extended_variants[ultimaker3_aa0.8.inst.cfg-ultimaker3_extended_aa0.8.inst.cfg] PASSED
tests/TestProfileRequirements.py::test_ultimaker3extended_variants[ultimaker3_aa04.inst.cfg-ultimaker3_extended_aa04.inst.cfg] PASSED
tests/TestProfileRequirements.py::test_ultimaker3extended_variants[ultimaker3_bb0.8.inst.cfg-ultimaker3_extended_bb0.8.inst.cfg] PASSED
tests/TestProfileRequirements.py::test_ultimaker3extended_variants[ultimaker3_bb04.inst.cfg-ultimaker3_extended_bb04.inst.cfg] PASSED
tests/Settings/TestCuraContainerRegistry.py::test_addContainerExtruderStack PASSED
tests/Settings/TestCuraContainerRegistry.py::test_addContainerGlobalStack PASSED
tests/Settings/TestCuraContainerRegistry.py::test_addContainerGoodSettingVersion PASSED
tests/Settings/TestCuraContainerRegistry.py::test_addContainerNoSettingVersion PASSED
tests/Settings/TestCuraContainerRegistry.py::test_addContainerBadSettingVersion PASSED
tests/Settings/TestCuraContainerRegistry.py::test_loadTypes[ExtruderLegacy.stack.cfg-ExtruderStack] PASSED
tests/Settings/TestCuraContainerRegistry.py::test_loadTypes[MachineLegacy.stack.cfg-GlobalStack] PASSED
tests/Settings/TestCuraContainerRegistry.py::test_loadTypes[Left.extruder.cfg-ExtruderStack] PASSED
tests/Settings/TestCuraContainerRegistry.py::test_loadTypes[Global.global.cfg-GlobalStack] PASSED
tests/Settings/TestCuraContainerRegistry.py::test_loadTypes[Global.stack.cfg-GlobalStack] PASSED
tests/Settings/TestCuraContainerRegistry.py::test_loadLegacyFileRenamed PASSED
tests/Settings/TestExtruderStack.py::test_addContainer PASSED
tests/Settings/TestExtruderStack.py::test_constrainUserChangesInvalid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainUserChangesInvalid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainUserChangesInvalid[container2] PASSED
tests/Settings/TestExtruderStack.py::test_constrainUserChangesValid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainUserChangesValid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityChangesInvalid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityChangesInvalid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityChangesInvalid[container2] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityChangesValid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityChangesValid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityInvalid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityInvalid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityInvalid[container2] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityValid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainQualityValid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainMaterialInvalid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainMaterialInvalid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainMaterialInvalid[container2] PASSED
tests/Settings/TestExtruderStack.py::test_constrainMaterialValid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainMaterialValid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainVariantValid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainVariantValid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainVariantInvalid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainVariantInvalid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_constrainDefinitionValid[container0] PASSED
tests/Settings/TestExtruderStack.py::test_constrainDefinitionValid[container1] PASSED
tests/Settings/TestExtruderStack.py::test_deserializeCompletesEmptyContainers SKIPPED
tests/Settings/TestExtruderStack.py::test_deserializeRemovesWrongInstanceContainer PASSED
tests/Settings/TestExtruderStack.py::test_deserializeRemovesWrongContainerClass PASSED
tests/Settings/TestExtruderStack.py::test_deserializeWrongDefinitionClass PASSED
tests/Settings/TestExtruderStack.py::test_deserializeMoveInstanceContainer PASSED
tests/Settings/TestExtruderStack.py::test_deserializeMoveDefinitionContainer SKIPPED
tests/Settings/TestExtruderStack.py::test_getPropertyFallThrough FAILED
tests/Settings/TestExtruderStack.py::test_insertContainer PASSED
tests/Settings/TestExtruderStack.py::test_removeContainer PASSED
tests/Settings/TestExtruderStack.py::test_setDefinitionByIdExists PASSED
tests/Settings/TestExtruderStack.py::test_setDefinitionByIdDoesntExist PASSED
tests/Settings/TestExtruderStack.py::test_setMaterialByIdExists PASSED
tests/Settings/TestExtruderStack.py::test_setMaterialByIdDoesntExist PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyUser[layer_height-value-0.1337] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyUser[foo-value-100] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyUser[support_enabled-value-True] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyUser[layer_height-default_value-0.1337] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyUser[layer_height-is_bright_pink-of course] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyOtherContainers[user-userChanges] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyOtherContainers[quality_changes-qualityChanges] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyOtherContainers[quality-quality] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyOtherContainers[material-material] PASSED
tests/Settings/TestExtruderStack.py::test_setPropertyOtherContainers[variant-variant] PASSED
tests/Settings/TestExtruderStack.py::test_setQualityByIdExists PASSED
tests/Settings/TestExtruderStack.py::test_setQualityByIdDoesntExist PASSED
tests/Settings/TestExtruderStack.py::test_setQualityChangesByIdExists PASSED
tests/Settings/TestExtruderStack.py::test_setQualityChangesByIdDoesntExist PASSED
tests/Settings/TestExtruderStack.py::test_setVariantByIdExists PASSED
tests/Settings/TestExtruderStack.py::test_setVariantByIdDoesntExist PASSED
tests/Settings/TestGlobalStack.py::test_addContainer PASSED
tests/Settings/TestGlobalStack.py::test_addExtruder FAILED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameter[2.85-3] PASSED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameter[1.75-2] PASSED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameter[3.0-3] PASSED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameter[2.0-2] PASSED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameter[0-0] PASSED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameter[-10.1--10] PASSED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameter[-1--1] PASSED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameter[9000.1-9000] PASSED
tests/Settings/TestGlobalStack.py::test_approximateMaterialDiameterNoDiameter PASSED
tests/Settings/TestGlobalStack.py::test_constrainUserChangesInvalid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainUserChangesInvalid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainUserChangesInvalid[container2] PASSED
tests/Settings/TestGlobalStack.py::test_constrainUserChangesValid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainUserChangesValid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityChangesInvalid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityChangesInvalid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityChangesInvalid[container2] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityChangesValid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityChangesValid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityInvalid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityInvalid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityInvalid[container2] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityValid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainQualityValid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainMaterialInvalid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainMaterialInvalid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainMaterialInvalid[container2] PASSED
tests/Settings/TestGlobalStack.py::test_constrainMaterialValid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainMaterialValid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainVariantValid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainVariantValid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainDefinitionChangesInvalid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainDefinitionChangesInvalid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainDefinitionChangesInvalid[container2] PASSED
tests/Settings/TestGlobalStack.py::test_constrainDefinitionChangesValid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainDefinitionChangesValid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainVariantInvalid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainVariantInvalid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_constrainDefinitionValid[container0] PASSED
tests/Settings/TestGlobalStack.py::test_constrainDefinitionValid[container1] PASSED
tests/Settings/TestGlobalStack.py::test_deserializeCompletesEmptyContainers SKIPPED
tests/Settings/TestGlobalStack.py::test_deserializeRemovesWrongInstanceContainer PASSED
tests/Settings/TestGlobalStack.py::test_deserializeRemovesWrongContainerClass PASSED
tests/Settings/TestGlobalStack.py::test_deserializeWrongDefinitionClass PASSED
tests/Settings/TestGlobalStack.py::test_deserializeMoveInstanceContainer PASSED
tests/Settings/TestGlobalStack.py::test_deserializeMoveDefinitionContainer SKIPPED
tests/Settings/TestGlobalStack.py::test_getPropertyFallThrough FAILED
tests/Settings/TestGlobalStack.py::test_getPropertyNoResolveInDefinition FAILED
tests/Settings/TestGlobalStack.py::test_getPropertyResolveInDefinition FAILED
tests/Settings/TestGlobalStack.py::test_getPropertyResolveInInstance FAILED
tests/Settings/TestGlobalStack.py::test_getPropertyInstancesBeforeResolve FAILED
tests/Settings/TestGlobalStack.py::test_hasUserValueUserChanges PASSED
tests/Settings/TestGlobalStack.py::test_hasUserValueQualityChanges PASSED
tests/Settings/TestGlobalStack.py::test_hasNoUserValue PASSED
tests/Settings/TestGlobalStack.py::test_insertContainer PASSED
tests/Settings/TestGlobalStack.py::test_removeContainer PASSED
tests/Settings/TestGlobalStack.py::test_setDefinitionByIdExists PASSED
tests/Settings/TestGlobalStack.py::test_setDefinitionByIdDoesntExist PASSED
tests/Settings/TestGlobalStack.py::test_setDefinitionChangesByIdExists PASSED
tests/Settings/TestGlobalStack.py::test_setDefinitionChangesByIdDoesntExist PASSED
tests/Settings/TestGlobalStack.py::test_setMaterialByIdExists PASSED
tests/Settings/TestGlobalStack.py::test_setMaterialByIdDoesntExist PASSED
tests/Settings/TestGlobalStack.py::test_setNextStack PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyUser[layer_height-value-0.1337] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyUser[foo-value-100] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyUser[support_enabled-value-True] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyUser[layer_height-default_value-0.1337] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyUser[layer_height-is_bright_pink-of course] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyOtherContainers[user-userChanges] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyOtherContainers[quality_changes-qualityChanges] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyOtherContainers[quality-quality] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyOtherContainers[material-material] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyOtherContainers[variant-variant] PASSED
tests/Settings/TestGlobalStack.py::test_setPropertyOtherContainers[definition_changes-definitionChanges] PASSED
tests/Settings/TestGlobalStack.py::test_setQualityByIdExists PASSED
tests/Settings/TestGlobalStack.py::test_setQualityByIdDoesntExist PASSED
tests/Settings/TestGlobalStack.py::test_setQualityChangesByIdExists PASSED
tests/Settings/TestGlobalStack.py::test_setQualityChangesByIdDoesntExist PASSED
tests/Settings/TestGlobalStack.py::test_setVariantByIdExists PASSED
tests/Settings/TestGlobalStack.py::test_setVariantByIdDoesntExist PASSED
tests/Settings/TestGlobalStack.py::test_smoke_findDefaultVariant PASSED
tests/Settings/TestGlobalStack.py::test_smoke_findDefaultMaterial PASSED
tests/Settings/TestGlobalStack.py::test_smoke_findDefaultQuality PASSED
=================================== FAILURES ===================================
_________________________ test_getPropertyFallThrough __________________________
extruder_stack = <cura.Settings.ExtruderStack.ExtruderStack object at 0x7fce9ccba3a8>
def test_getPropertyFallThrough(extruder_stack):
# ExtruderStack.setNextStack calls registerExtruder for backward compatibility, but we do not need a complete extruder manager
ExtruderManager._ExtruderManager__instance = unittest.mock.MagicMock()
#A few instance container mocks to put in the stack.
mock_layer_heights = {} #For each container type, a mock container that defines layer height to something unique.
mock_no_settings = {} #For each container type, a mock container that has no settings at all.
container_indices = cura.Settings.CuraContainerStack._ContainerIndexes #Cache.
for type_id, type_name in container_indices.IndexTypeMap.items():
container = unittest.mock.MagicMock()
# Return type_id when asking for value and -1 when asking for limit_to_extruder
container.getProperty = lambda key, property, type_id = type_id: type_id if (key == "layer_height" and property == "value") else (None if property != "limit_to_extruder" else "-1") #Returns the container type ID as layer height, in order to identify it.
container.hasProperty = lambda key, property: key == "layer_height"
container.getMetaDataEntry = unittest.mock.MagicMock(return_value = type_name)
mock_layer_heights[type_id] = container
container = unittest.mock.MagicMock()
container.getProperty = unittest.mock.MagicMock(return_value = None) #Has no settings at all.
container.hasProperty = unittest.mock.MagicMock(return_value = False)
container.getMetaDataEntry = unittest.mock.MagicMock(return_value = type_name)
mock_no_settings[type_id] = container
extruder_stack.userChanges = mock_no_settings[container_indices.UserChanges]
extruder_stack.qualityChanges = mock_no_settings[container_indices.QualityChanges]
extruder_stack.quality = mock_no_settings[container_indices.Quality]
extruder_stack.material = mock_no_settings[container_indices.Material]
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
E AssertionError: assert <UM.Settings.PropertyEvaluationContext.PropertyEvaluationContext object at 0x7fce9c51f400> == 6
E + where <UM.Settings.PropertyEvaluationContext.PropertyEvaluationContext object at 0x7fce9c51f400> = <bound method ExtruderStack.getProperty of <cura.Settings.ExtruderStack.ExtruderStack object at 0x7fce9ccba3a8>>('layer_height', 'value')
E + where <bound method ExtruderStack.getProperty of <cura.Settings.ExtruderStack.ExtruderStack object at 0x7fce9ccba3a8>> = <cura.Settings.ExtruderStack.ExtruderStack object at 0x7fce9ccba3a8>.getProperty
E + and 6 = <class 'cura.Settings.CuraContainerStack._ContainerIndexes'>.Definition
tests/Settings/TestExtruderStack.py:274: AssertionError
_______________________________ test_addExtruder _______________________________
global_stack = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c414048>
def test_addExtruder(global_stack):
mock_definition = unittest.mock.MagicMock()
mock_definition.getProperty = lambda key, property: 2 if key == "machine_extruder_count" and property == "value" else None
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock):
global_stack.definition = mock_definition
assert len(global_stack.extruders) == 0
first_extruder = unittest.mock.MagicMock()
first_extruder.getMetaDataEntry = lambda key: 0 if key == "position" else None
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock):
> global_stack.addExtruder(first_extruder)
tests/Settings/TestGlobalStack.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cura/Settings/GlobalStack.py:64: in addExtruder
extruder_count = self.getProperty("machine_extruder_count", "value")
cura/Settings/GlobalStack.py:104: in getProperty
if self._shouldResolve(key, property_name, context):
cura/Settings/GlobalStack.py:166: in _shouldResolve
setting_state = super().getProperty(key, "state", context = context)
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:199: in getProperty
value = self.getRawProperty(key, property_name, context = context)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c414048>
key = 'machine_extruder_count', property_name = 'state'
def getRawProperty(self, key, property_name, *, context: Optional[PropertyEvaluationContext] = None,
use_next = True, skip_until_container = None):
containers = self._containers
if context is not None:
# if context is provided, check if there is any container that needs to be skipped.
start_index = context.context.get("evaluate_from_container_index", 0)
if start_index >= len(self._containers):
return None
containers = self._containers[start_index:]
for container in containers:
if skip_until_container and container.getId() != skip_until_container:
continue #Skip.
skip_until_container = None #When we find the container, stop skipping.
> value = container.getProperty(key, property_name, context)
E TypeError: <lambda>() takes 2 positional arguments but 3 were given
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:240: TypeError
_________________________ test_getPropertyFallThrough __________________________
global_stack = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389948>
def test_getPropertyFallThrough(global_stack):
#A few instance container mocks to put in the stack.
mock_layer_heights = {} #For each container type, a mock container that defines layer height to something unique.
mock_no_settings = {} #For each container type, a mock container that has no settings at all.
container_indexes = cura.Settings.CuraContainerStack._ContainerIndexes #Cache.
for type_id, type_name in container_indexes.IndexTypeMap.items():
container = unittest.mock.MagicMock()
container.getProperty = lambda key, property, type_id = type_id: type_id if (key == "layer_height" and property == "value") else None #Returns the container type ID as layer height, in order to identify it.
container.hasProperty = lambda key, property: key == "layer_height"
container.getMetaDataEntry = unittest.mock.MagicMock(return_value = type_name)
mock_layer_heights[type_id] = container
container = unittest.mock.MagicMock()
container.getProperty = unittest.mock.MagicMock(return_value = None) #Has no settings at all.
container.hasProperty = unittest.mock.MagicMock(return_value = False)
container.getMetaDataEntry = unittest.mock.MagicMock(return_value = type_name)
mock_no_settings[type_id] = container
global_stack.userChanges = mock_no_settings[container_indexes.UserChanges]
global_stack.qualityChanges = mock_no_settings[container_indexes.QualityChanges]
global_stack.quality = mock_no_settings[container_indexes.Quality]
global_stack.material = mock_no_settings[container_indexes.Material]
global_stack.variant = mock_no_settings[container_indexes.Variant]
global_stack.definitionChanges = mock_no_settings[container_indexes.DefinitionChanges]
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
global_stack.definition = mock_layer_heights[container_indexes.Definition] #There's a layer height in here!
> assert global_stack.getProperty("layer_height", "value") == container_indexes.Definition
E AssertionError: assert <UM.Settings.PropertyEvaluationContext.PropertyEvaluationContext object at 0x7fce9c347d68> == 6
E + where <UM.Settings.PropertyEvaluationContext.PropertyEvaluationContext object at 0x7fce9c347d68> = <bound method GlobalStack.getProperty of <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389948>>('layer_height', 'value')
E + where <bound method GlobalStack.getProperty of <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389948>> = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389948>.getProperty
E + and 6 = <class 'cura.Settings.CuraContainerStack._ContainerIndexes'>.Definition
tests/Settings/TestGlobalStack.py:341: AssertionError
____________________ test_getPropertyNoResolveInDefinition _____________________
global_stack = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c3899d8>
def test_getPropertyNoResolveInDefinition(global_stack):
value = unittest.mock.MagicMock() #Just sets the value for bed temperature.
value.getProperty = lambda key, property: 10 if (key == "material_bed_temperature" and property == "value") else None
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
global_stack.definition = value
> assert global_stack.getProperty("material_bed_temperature", "value") == 10 #No resolve, so fall through to value.
tests/Settings/TestGlobalStack.py:362:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cura/Settings/GlobalStack.py:104: in getProperty
if self._shouldResolve(key, property_name, context):
cura/Settings/GlobalStack.py:166: in _shouldResolve
setting_state = super().getProperty(key, "state", context = context)
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:199: in getProperty
value = self.getRawProperty(key, property_name, context = context)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c3899d8>
key = 'material_bed_temperature', property_name = 'state'
def getRawProperty(self, key, property_name, *, context: Optional[PropertyEvaluationContext] = None,
use_next = True, skip_until_container = None):
containers = self._containers
if context is not None:
# if context is provided, check if there is any container that needs to be skipped.
start_index = context.context.get("evaluate_from_container_index", 0)
if start_index >= len(self._containers):
return None
containers = self._containers[start_index:]
for container in containers:
if skip_until_container and container.getId() != skip_until_container:
continue #Skip.
skip_until_container = None #When we find the container, stop skipping.
> value = container.getProperty(key, property_name, context)
E TypeError: <lambda>() takes 2 positional arguments but 3 were given
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:240: TypeError
_____________________ test_getPropertyResolveInDefinition ______________________
global_stack = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389ca8>
def test_getPropertyResolveInDefinition(global_stack):
resolve_and_value = unittest.mock.MagicMock() #Sets the resolve and value for bed temperature.
resolve_and_value.getProperty = lambda key, property: (7.5 if property == "resolve" else 5) if (key == "material_bed_temperature" and property in ("resolve", "value")) else None #7.5 resolve, 5 value.
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
global_stack.definition = resolve_and_value
> assert global_stack.getProperty("material_bed_temperature", "value") == 7.5 #Resolve wins in the definition.
tests/Settings/TestGlobalStack.py:372:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cura/Settings/GlobalStack.py:104: in getProperty
if self._shouldResolve(key, property_name, context):
cura/Settings/GlobalStack.py:166: in _shouldResolve
setting_state = super().getProperty(key, "state", context = context)
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:199: in getProperty
value = self.getRawProperty(key, property_name, context = context)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389ca8>
key = 'material_bed_temperature', property_name = 'state'
def getRawProperty(self, key, property_name, *, context: Optional[PropertyEvaluationContext] = None,
use_next = True, skip_until_container = None):
containers = self._containers
if context is not None:
# if context is provided, check if there is any container that needs to be skipped.
start_index = context.context.get("evaluate_from_container_index", 0)
if start_index >= len(self._containers):
return None
containers = self._containers[start_index:]
for container in containers:
if skip_until_container and container.getId() != skip_until_container:
continue #Skip.
skip_until_container = None #When we find the container, stop skipping.
> value = container.getProperty(key, property_name, context)
E TypeError: <lambda>() takes 2 positional arguments but 3 were given
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:240: TypeError
______________________ test_getPropertyResolveInInstance _______________________
global_stack = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389dc8>
def test_getPropertyResolveInInstance(global_stack):
container_indices = cura.Settings.CuraContainerStack._ContainerIndexes
instance_containers = {}
for container_type in container_indices.IndexTypeMap:
instance_containers[container_type] = unittest.mock.MagicMock() #Sets the resolve and value for bed temperature.
instance_containers[container_type].getProperty = lambda key, property: (7.5 if property == "resolve" else (InstanceState.User if property == "state" else (5 if property != "limit_to_extruder" else "-1"))) if (key == "material_bed_temperature") else None #7.5 resolve, 5 value.
instance_containers[container_type].getMetaDataEntry = unittest.mock.MagicMock(return_value = container_indices.IndexTypeMap[container_type]) #Make queries for the type return the desired type.
instance_containers[container_indices.Definition].getProperty = lambda key, property: 10 if (key == "material_bed_temperature" and property == "value") else None #Definition only has value.
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
global_stack.definition = instance_containers[container_indices.Definition] #Stack must have a definition.
#For all instance container slots, the value reigns over resolve.
global_stack.definitionChanges = instance_containers[container_indices.DefinitionChanges]
> assert global_stack.getProperty("material_bed_temperature", "value") == 5
tests/Settings/TestGlobalStack.py:389:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cura/Settings/GlobalStack.py:104: in getProperty
if self._shouldResolve(key, property_name, context):
cura/Settings/GlobalStack.py:166: in _shouldResolve
setting_state = super().getProperty(key, "state", context = context)
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:199: in getProperty
value = self.getRawProperty(key, property_name, context = context)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389dc8>
key = 'material_bed_temperature', property_name = 'state'
def getRawProperty(self, key, property_name, *, context: Optional[PropertyEvaluationContext] = None,
use_next = True, skip_until_container = None):
containers = self._containers
if context is not None:
# if context is provided, check if there is any container that needs to be skipped.
start_index = context.context.get("evaluate_from_container_index", 0)
if start_index >= len(self._containers):
return None
containers = self._containers[start_index:]
for container in containers:
if skip_until_container and container.getId() != skip_until_container:
continue #Skip.
skip_until_container = None #When we find the container, stop skipping.
> value = container.getProperty(key, property_name, context)
E TypeError: <lambda>() takes 2 positional arguments but 3 were given
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:240: TypeError
____________________ test_getPropertyInstancesBeforeResolve ____________________
global_stack = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389ee8>
def test_getPropertyInstancesBeforeResolve(global_stack):
value = unittest.mock.MagicMock() #Sets just the value.
value.getProperty = lambda key, property: (10 if property == "value" else (InstanceState.User if property != "limit_to_extruder" else "-1")) if key == "material_bed_temperature" else None
value.getMetaDataEntry = unittest.mock.MagicMock(return_value = "quality")
resolve = unittest.mock.MagicMock() #Sets just the resolve.
resolve.getProperty = lambda key, property: 7.5 if (key == "material_bed_temperature" and property == "resolve") else None
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
global_stack.definition = resolve
global_stack.quality = value
> assert global_stack.getProperty("material_bed_temperature", "value") == 10
tests/Settings/TestGlobalStack.py:414:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cura/Settings/GlobalStack.py:104: in getProperty
if self._shouldResolve(key, property_name, context):
cura/Settings/GlobalStack.py:166: in _shouldResolve
setting_state = super().getProperty(key, "state", context = context)
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:199: in getProperty
value = self.getRawProperty(key, property_name, context = context)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cura.Settings.GlobalStack.GlobalStack object at 0x7fce9c389ee8>
key = 'material_bed_temperature', property_name = 'state'
def getRawProperty(self, key, property_name, *, context: Optional[PropertyEvaluationContext] = None,
use_next = True, skip_until_container = None):
containers = self._containers
if context is not None:
# if context is provided, check if there is any container that needs to be skipped.
start_index = context.context.get("evaluate_from_container_index", 0)
if start_index >= len(self._containers):
return None
containers = self._containers[start_index:]
for container in containers:
if skip_until_container and container.getId() != skip_until_container:
continue #Skip.
skip_until_container = None #When we find the container, stop skipping.
> value = container.getProperty(key, property_name, context)
E TypeError: <lambda>() takes 2 positional arguments but 3 were given
/usr/lib/python3.6/site-packages/UM/Settings/ContainerStack.py:240: TypeError
=============== 7 failed, 159 passed, 4 skipped in 51.49 seconds ===============
That's python 3.6.3 on Fedora 28 x86_64.
Our nightly automated builds run fine and include running the tests. We make builds for all OSs, but not sure what the Linux distro is (probably Debian based).
No, they do not. The nightly builds just build. See http://hal9000.ultimaker.com:29130/job/Ultimaker/job/Cura/job/master/360/testReport/ for the test results, which confirms @hroncok's observation.
OK, we'll need to fix some of the tests then. Devs: CURA-4498
Made a fix for this: 7d46eead606170b7fab9c1f1e51b10caf554adf1