def test_unknownBedAdhesion(self, build_volume: BuildVolume): self.createAndSetGlobalStack(build_volume) patched_dictionary = self.setting_property_dict.copy() patched_dictionary.update({"adhesion_type": {"value": "OMGZOMGBBQ"}}) with patch.dict(self.setting_property_dict, patched_dictionary): with pytest.raises(Exception): build_volume._calculateBedAdhesionSize([])
def test_singleExtruder(self, build_volume: BuildVolume, setting_dict, result): self.createAndSetGlobalStack(build_volume) patched_dictionary = self.setting_property_dict.copy() patched_dictionary.update(setting_dict) with patch.dict(self.setting_property_dict, patched_dictionary): assert build_volume._calculateBedAdhesionSize([]) == result
def test_singleExtruder(self, build_volume: BuildVolume, setting_dict, result): self.createAndSetGlobalStack(build_volume) patched_dictionary = self.setting_property_dict.copy() patched_dictionary.update(setting_dict) patched_dictionary.update({ "skirt_brim_extruder_nr": {"value": 0}, "raft_base_extruder_nr": {"value": 0}, "raft_interface_extruder_nr": {"value": 0}, "raft_surface_extruder_nr": {"value": 0} }) with patch.dict(self.setting_property_dict, patched_dictionary): assert build_volume._calculateBedAdhesionSize([]) == result
def test_noGlobalStack(self, build_volume: BuildVolume): assert build_volume._calculateBedAdhesionSize([]) is None