Fixed linuxcnc unit test

This commit is contained in:
Markus Lampert
2016-11-18 16:14:32 -08:00
parent e04be20ba8
commit 376571dd41
3 changed files with 81 additions and 32 deletions

View File

@@ -90,8 +90,13 @@ class PathPostTestCases(unittest.TestCase):
with open(referenceFile, 'r') as fp:
refGCode = fp.read()
# Use if this test fails in order to have a real good look at the changes
if False:
with open('tab.tmp', 'w') as fp:
fp.write(gcode)
if gcode != refGCode:
msg = ''.join(difflib.ndiff(gcode.splitlines(True), refGCode.splitlines(True)))
self.fail("linuxcnc output doesn't match: " + msg)