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.
This commit is contained in:
jalapenopuzzle
2025-04-06 18:27:57 +10:00
parent ed29dc3ef0
commit d8b4a5b3e6

View File

@@ -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")