Skip to content

ImproveOpensbp: TestPathToolLibrarySerializer.py test fail #41

@awgrover

Description

@awgrover

Problem description

I'm still based on ImproveOpensbp.
Maybe a more tolerant assertEqual, or explicit precision in

Path/Tool/library/serializers/linuxcnc.py
class LinuxCNCSerializer
def serialize():
75: f"D{diameter_value} I0 J0 Q0 ;{bit.label}\n"
FAIL: test_linuxcnc_serialize (CAMTests.TestPathToolLibrarySerializer.TestLinuxCNCLibrarySerializer.test_linuxcnc_serialize)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/awgrover/dev/personal/awgFreecad/shopbot-pp-machine-template-git/FreeCAD/build/debug/Mod/CAM/CAMTests/TestPathToolLibr
arySerializer.py", line 149, in test_linuxcnc_serialize
    self.assertEqual(lines[0], "T1 P0 X0 Y0 Z0 A0 B0 C0 U0 V0 W0 D6.00 I0 J0 Q0 ;Endmill 6mm")
AssertionError: 'T1 P0 X0 Y0 Z0 A0 B0 C0 U0 V0 W0 D6.0000 I0 J0 Q0 ;Endmill 6mm' != 'T1 P0 X0 Y0 Z0 A0 B0 C0 U0 V0 W0 D6.00 I0 J0 Q0 ;Endmill 6mm'
- T1 P0 X0 Y0 Z0 A0 B0 C0 U0 V0 W0 D6.0000 I0 J0 Q0 ;Endmill 6mm
?                                       --
+ T1 P0 X0 Y0 Z0 A0 B0 C0 U0 V0 W0 D6.00 I0 J0 Q0 ;Endmill 6mm

The 2 asserts with it have the same issue.

Workbench affected?

None

Steps to reproduce

pixi run build/debug/bin/FreeCADCmd -t CAMTests.TestPathToolLibrarySerializer.TestLinuxCNCLibrarySerializer.test_linuxcnc_serialize

Expected behavior

OK

Actual behavior

see above

Development version About Info (in Safe Mode)

Ubuntu 24.04.4 LTS
pixi 0.65.0

Last known good version (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions