From 863569b7dece3c7f77eaebe0532722ec40056da5 Mon Sep 17 00:00:00 2001 From: Dmitry Gribenchuk Date: Thu, 17 Oct 2024 11:24:48 +0300 Subject: [PATCH] small code-style fixes --- tests/TestBuildVolume.py | 1 - tests/TestConvexHullDecorator.py | 2 +- tests/TestCuraSceneController.py | 3 +-- tests/TestCuraSceneNode.py | 2 -- tests/TestLayer.py | 2 +- tests/TestObjectsModel.py | 1 - tests/TestPrintInformation.py | 2 +- tests/TestProfileRequirements.py | 6 +++--- 8 files changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/TestBuildVolume.py b/tests/TestBuildVolume.py index 5012784bdf0..ece4b22d6f9 100644 --- a/tests/TestBuildVolume.py +++ b/tests/TestBuildVolume.py @@ -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 - diff --git a/tests/TestConvexHullDecorator.py b/tests/TestConvexHullDecorator.py index eed5a3a6c36..94bcd58f37d 100644 --- a/tests/TestConvexHullDecorator.py +++ b/tests/TestConvexHullDecorator.py @@ -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]]) \ No newline at end of file + assert convex_hull_decorator._compute2DConvexHull() == Polygon([[-5.0, 5.0], [5.0, 5.0], [5.0, -5.0], [-5.0, -5.0]]) diff --git a/tests/TestCuraSceneController.py b/tests/TestCuraSceneController.py index 634ce89d867..fe6f964593e 100644 --- a/tests/TestCuraSceneController.py +++ b/tests/TestCuraSceneController.py @@ -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 diff --git a/tests/TestCuraSceneNode.py b/tests/TestCuraSceneNode.py index 9e2fcb11880..77f4051a998 100644 --- a/tests/TestCuraSceneNode.py +++ b/tests/TestCuraSceneNode.py @@ -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 - - diff --git a/tests/TestLayer.py b/tests/TestLayer.py index f8183437d6f..602a0a50613 100644 --- a/tests/TestLayer.py +++ b/tests/TestLayer.py @@ -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 \ No newline at end of file + assert layer.elementCount == 12 diff --git a/tests/TestObjectsModel.py b/tests/TestObjectsModel.py index b34c32a95ee..1bc0bf6aced 100644 --- a/tests/TestObjectsModel.py +++ b/tests/TestObjectsModel.py @@ -226,4 +226,3 @@ def test_updateOutsideBuildplate(self, objects_model, application_with_mocked_sc "per_object_settings_count": 0, "mesh_type": "" }] - diff --git a/tests/TestPrintInformation.py b/tests/TestPrintInformation.py index bfebe4a5288..4135782f0cf 100644 --- a/tests/TestPrintInformation.py +++ b/tests/TestPrintInformation.py @@ -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 \ No newline at end of file + assert printer_name[0] + "_" + project_name[0] == print_information._job_name diff --git a/tests/TestProfileRequirements.py b/tests/TestProfileRequirements.py index a88513ce24f..c2114cba790 100644 --- a/tests/TestProfileRequirements.py +++ b/tests/TestProfileRequirements.py @@ -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 @@ -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"),