Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small code-style fixes #19768

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/TestBuildVolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,4 +424,3 @@ def test_oneAtATime(self, build_volume: BuildVolume):
with patch("cura.Settings.ExtruderManager.ExtruderManager.getInstance"):
with patch.dict(self.setting_property_dict, {"print_sequence": {"value": "one_at_a_time"}}):
assert build_volume.getEdgeDisallowedSize() == 0.1

2 changes: 1 addition & 1 deletion tests/TestConvexHullDecorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ def test_compute2DConvexHullMeshDataGrouped(convex_hull_decorator):
copied_decorator._global_stack = mocked_stack
copied_decorator._getSettingProperty = MagicMock(return_value=0)
node.addDecorator(copied_decorator)
assert convex_hull_decorator._compute2DConvexHull() == Polygon([[-5.0, 5.0], [5.0, 5.0], [5.0, -5.0], [-5.0, -5.0]])
assert convex_hull_decorator._compute2DConvexHull() == Polygon([[-5.0, 5.0], [5.0, 5.0], [5.0, -5.0], [-5.0, -5.0]])
3 changes: 1 addition & 2 deletions tests/TestCuraSceneController.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@ def test_updateMaxBuildPlate(objects_model, multi_build_plate_model):
# And check what happens if we move down again!
controller._calcMaxBuildPlate = MagicMock(return_value=2)
controller.updateMaxBuildPlate(SceneNode())
assert controller._active_build_plate == 0 # We don't have any items anywhere, so default to 0

assert controller._active_build_plate == 0 # We don't have any items anywhere, so default to 0
2 changes: 0 additions & 2 deletions tests/TestCuraSceneNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,3 @@ def test_invalidConvexHull(self, cura_scene_node):
def test_outsideBuildArea(cura_scene_node):
cura_scene_node.setOutsideBuildArea(True)
assert cura_scene_node.isOutsideBuildArea


2 changes: 1 addition & 1 deletion tests/TestLayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ def test_elementCount():
layer_polygon.elementCount = 12
layer.polygons.append(layer_polygon)
assert layer.build(0, 0, [], [], [], [], [] ,[] , []) == (9001, 9002)
assert layer.elementCount == 12
assert layer.elementCount == 12
1 change: 0 additions & 1 deletion tests/TestObjectsModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,3 @@ def test_updateOutsideBuildplate(self, objects_model, application_with_mocked_sc
"per_object_settings_count": 0,
"mesh_type": ""
}]

2 changes: 1 addition & 1 deletion tests/TestPrintInformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ def test_defineAbbreviatedMachineName():
# Test not ultimaker printer, name suffix should have first letter from the printer name
project_name = ["HelloWorld", ".3mf"]
print_information.setProjectName(project_name[0] + project_name[1])
assert printer_name[0] + "_" + project_name[0] == print_information._job_name
assert printer_name[0] + "_" + project_name[0] == print_information._job_name
6 changes: 3 additions & 3 deletions tests/TestProfileRequirements.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.

import configparser #To read the profiles.
import os #To join paths.
import configparser # To read the profiles.
import os # To join paths.
import pytest

## Makes sure that the variants for the Ultimaker 3 Extended are exactly the
Expand All @@ -13,7 +13,7 @@
# needed, but until then we should keep them the same. It's happened all too
# often that we updated the variants for the UM3 but forgot about the UM3E.
@pytest.mark.parametrize("um3_file, um3e_file", [
#List the corresponding files below.
# List the corresponding files below.
("ultimaker3_aa0.25.inst.cfg", "ultimaker3_extended_aa0.25.inst.cfg"),
("ultimaker3_aa0.8.inst.cfg", "ultimaker3_extended_aa0.8.inst.cfg"),
("ultimaker3_aa04.inst.cfg", "ultimaker3_extended_aa04.inst.cfg"),
Expand Down
Loading