Fixed unit tests

This commit is contained in:
Markus Lampert
2022-02-22 21:43:23 -08:00
committed by mlampert
parent d80c4ce399
commit 79779ac96f

View File

@@ -88,7 +88,6 @@ class TestPathThreadMilling(PathTestBase):
elevator = 2
path, start = PathThreadMilling.threadCommands(center, cmd, zStart, zFinal, pitch, radius, leadInOut, elevator, None)
print(start)
gcode = [
'G0 X0.000000 Y2.000000',
@@ -99,7 +98,7 @@ class TestPathThreadMilling(PathTestBase):
'G1 X0.000000 Y2.000000',
]
self.assertEqual([p.toGCode() for p in path], gcode)
self.assertCoincide(start, FreeCAD.Vector(0, 2, 0))
self.assertCoincide(start, FreeCAD.Vector(0, 2, zFinal))
def test41(self):
'''Verify thread commands for a thwo threads'''
@@ -126,7 +125,7 @@ class TestPathThreadMilling(PathTestBase):
'G1 X0.000000 Y2.000000',
]
self.assertEqual([p.toGCode() for p in path], gcode)
self.assertCoincide(start, FreeCAD.Vector(0, 2, 0))
self.assertCoincide(start, FreeCAD.Vector(0, 2, zFinal))
def test42(self):
'''Verify thread commands for a one and a half threads'''
@@ -152,7 +151,7 @@ class TestPathThreadMilling(PathTestBase):
'G1 X0.000000 Y-2.000000',
]
self.assertEqual([p.toGCode() for p in path], gcode)
self.assertCoincide(start, FreeCAD.Vector(0, -2, 0))
self.assertCoincide(start, FreeCAD.Vector(0, -2, zFinal))
def test43(self):
'''Verify thread commands for a one and 3 quarter threads'''
@@ -181,7 +180,7 @@ class TestPathThreadMilling(PathTestBase):
'G1 X-2.000000 Y0.000000',
]
self.assertEqual([p.toGCode() for p in path], gcode)
self.assertCoincide(start, FreeCAD.Vector(-2, 0, 0))
self.assertCoincide(start, FreeCAD.Vector(-2, 0, zFinal))
def test44(self):
'''Verify thread commands for a one and 3 quarter threads - CCW'''
@@ -210,7 +209,7 @@ class TestPathThreadMilling(PathTestBase):
'G1 X2.000000 Y0.000000',
]
self.assertEqual([p.toGCode() for p in path], gcode)
self.assertCoincide(start, FreeCAD.Vector(2, 0, 0))
self.assertCoincide(start, FreeCAD.Vector(2, 0, zFinal))
def test50(self):
'''Verify lead in/out commands for a single thread'''
@@ -239,7 +238,7 @@ class TestPathThreadMilling(PathTestBase):
#'(------- lead-out -------)',
]
self.assertEqual([p.toGCode() for p in path], gcode)
self.assertCoincide(start, FreeCAD.Vector(0, 2, 0))
self.assertCoincide(start, FreeCAD.Vector(0, 2, zFinal))
def test51(self):
'''Verify lead in/out commands for one and a half threads'''
@@ -269,5 +268,5 @@ class TestPathThreadMilling(PathTestBase):
#'(------- lead-out -------)',
]
self.assertEqual([p.toGCode() for p in path], gcode)
self.assertCoincide(start, FreeCAD.Vector(0, -2, 0))
self.assertCoincide(start, FreeCAD.Vector(0, -2, zFinal))