From 1b4b36767db10777cbaff1dfef6bf50c5a7126f0 Mon Sep 17 00:00:00 2001 From: jalapenopuzzle <8386278+jalapenopuzzle@users.noreply.github.com> Date: Sun, 6 Apr 2025 18:27:57 +1000 Subject: [PATCH] CAM: snapmaker unit tests fix assertTrue() -> assertEqual() The test was NOT functioning as required. assert True does NOT compare the expected line with the generated GCode line. After fixing this, the expected output was updated so that the unit tests pass. --- src/Mod/CAM/CAMTests/TestSnapmakerPost.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/CAM/CAMTests/TestSnapmakerPost.py b/src/Mod/CAM/CAMTests/TestSnapmakerPost.py index 8cfdae2669..a95a11a50f 100644 --- a/src/Mod/CAM/CAMTests/TestSnapmakerPost.py +++ b/src/Mod/CAM/CAMTests/TestSnapmakerPost.py @@ -76,7 +76,7 @@ class TestSnapmakerPost(PathTestUtils.PathTestBase): ;Header Start ;header_type: cnc ;machine: Snapmaker 2 A350(T) -;Post Processor: Snapmaker_post +;Post Processor: snapmaker_post ;Cam File: boxtest.fcstd ;Output Time: \\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{0,6} ;thumbnail: deactivated.""" @@ -117,7 +117,7 @@ M5 if exp.startswith(";Output Time:"): self.assertTrue(re.match(exp, line) is not None) else: - self.assertTrue(line, exp) + self.assertEqual(exp, line) # test body without header gcode = self.get_gcode([], "--machine=A350 --toolhead=50W --spindle-percent --no-header")