mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Fix buildvolume tests
This commit is contained in:
parent
e73a18afc1
commit
1f1ee7ff60
1 changed files with 7 additions and 2 deletions
|
@ -146,7 +146,7 @@ class TestComputeDisallowedAreasStatic:
|
|||
build_volume._global_container_stack = mocked_stack
|
||||
with patch("cura.Settings.ExtruderManager.ExtruderManager.getInstance"):
|
||||
result = build_volume._computeDisallowedAreasStatic(0, [mocked_extruder])
|
||||
assert result == {"zomg": [Polygon([[-84.0, 102.5], [-115.0, 102.5], [-200.0, 112.5], [-82.0, 112.5]])]}
|
||||
assert result == {"zomg": [Polygon([[-84.0,102.5], [-115.0,102.5], [-200.0,112.5], [-82.0,112.5]]), Polygon([[-100.0,-100.0], [-100.0,100.0], [-99.9,99.9], [-99.9,-99.9]]), Polygon([[100.0,100.0], [100.0,-100.0], [99.9,-99.9], [99.9,99.9]]), Polygon([[-100.0,100.0], [100.0,100.0], [99.9,99.9], [-99.9,99.9]]), Polygon([[100.0,-100.0], [-100.0,-100.0], [-99.9,-99.9], [99.9,-99.9]])]}
|
||||
|
||||
def test_computeDisalowedAreasMutliExtruder(self, build_volume):
|
||||
mocked_stack = MagicMock()
|
||||
|
@ -160,7 +160,12 @@ class TestComputeDisallowedAreasStatic:
|
|||
build_volume._global_container_stack = mocked_stack
|
||||
with patch("cura.Settings.ExtruderManager.ExtruderManager.getInstance", MagicMock(return_value = extruder_manager)):
|
||||
result = build_volume._computeDisallowedAreasStatic(0, [mocked_extruder])
|
||||
assert result == {"zomg": [Polygon([[-84.0, 102.5], [-115.0, 102.5], [-200.0, 112.5], [-82.0, 112.5]])]}
|
||||
assert result == {"zomg": [Polygon([[-84.0, 102.5], [-115.0, 102.5], [-200.0, 112.5], [-82.0, 112.5]]),
|
||||
Polygon([[-100.0, -100.0], [-100.0, 100.0], [-99.9, 99.9], [-99.9, -99.9]]),
|
||||
Polygon([[100.0, 100.0], [100.0, -100.0], [99.9, -99.9], [99.9, 99.9]]),
|
||||
Polygon([[-100.0, 100.0], [100.0, 100.0], [99.9, 99.9], [-99.9, 99.9]]),
|
||||
Polygon([[100.0, -100.0], [-100.0, -100.0], [-99.9, -99.9], [99.9, -99.9]])]}
|
||||
|
||||
|
||||
class TestUpdateRaftThickness:
|
||||
setting_property_dict = {"raft_base_thickness": {"value": 1},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue