diff options
Diffstat (limited to 'tests/TestBuildVolume.py')
-rw-r--r-- | tests/TestBuildVolume.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/TestBuildVolume.py b/tests/TestBuildVolume.py index 6ccb3d0fb7..c5d59b64d7 100644 --- a/tests/TestBuildVolume.py +++ b/tests/TestBuildVolume.py @@ -1,5 +1,7 @@ +# Copyright (c) 2020 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + from unittest.mock import MagicMock, patch -from UM.Math.AxisAlignedBox import AxisAlignedBox import pytest from UM.Math.Polygon import Polygon @@ -7,9 +9,6 @@ from UM.Math.Vector import Vector from cura.BuildVolume import BuildVolume, PRIME_CLEARANCE import numpy - - - @pytest.fixture def build_volume() -> BuildVolume: mocked_application = MagicMock() @@ -162,12 +161,10 @@ class TestUpdateRaftThickness: return properties.get(args[2]) def createMockedStack(self): - mocked_global_stack = MagicMock(name="mocked_global_stack") - mocked_global_stack.getProperty = MagicMock(side_effect=self.getPropertySideEffect) + mocked_global_stack = MagicMock(name = "mocked_global_stack") + mocked_global_stack.getProperty = MagicMock(side_effect = self.getPropertySideEffect) extruder_stack = MagicMock() - mocked_global_stack.extruders = {"0": extruder_stack} - return mocked_global_stack def test_simple(self, build_volume: BuildVolume): @@ -255,7 +252,7 @@ class TestCalculateExtraZClearance: return properties.get(args[2]) def test_noContainerStack(self, build_volume: BuildVolume): - assert build_volume._calculateExtraZClearance([]) is 0 + assert build_volume._calculateExtraZClearance([]) == 0 def test_withRetractionHop(self, build_volume: BuildVolume): mocked_global_stack = MagicMock(name="mocked_global_stack") |