FAIL: test00010 (PathTests.TestRefactoredTestPost.TestRefactoredTestPost)
Test Outputting all arguments.
Traceback (most recent call last):
File "/home/harryvl/FreeCAD/build/Mod/Path/PathTests/TestRefactoredTestPost.py", line 194, in test00010
self.single_compare(
File "/home/harryvl/FreeCAD/build/Mod/Path/PathTests/TestRefactoredTestPost.py", line 99, in single_compare
self.assertEqual(gcode, expected)
AssertionError: 'Argu[259 chars]s the previous line\n --no-axis-modal O[2703 chars]0)\n' != 'Argu[259 chars]s the\n previous line\n[3103 chars]0)\n'
Diff is 6515 characters long. Set self.maxDiff to None to see it.
Probably related to "Path WB", but as far as I know the entire "Path WB" will be heavy modified in the next months, so maybe talking to @sliptonic or @mlampert will avoid maybe some inutile job.
Regards
Carlo D.
Last edited by onekk on Sat Sep 10, 2022 10:20 pm, edited 1 time in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
I just found out about this error in my code a couple of days ago.
The root cause is that the "argparse" python functions have a dependency on the number of columns in the terminal window that you start the tests from. If you run "./FreeCAD -c -t TestPathApp" it assumes 80 characters, but if you run "./FreeCADCmd -t TestPathApp" in the same code it may get a different number of columns. The test as currently written happens to be sensitive to the output of the argparse function that outputs the "help" information.
A workaround until I can get a fix installed is to start your tests from a terminal window that is 80 characters wide.
LarryWoestman wrote: ↑Fri Sep 09, 2022 4:28 pm
IA workaround until I can get a fix installed is to start your tests from a terminal window that is 80 characters wide.
I'm sorry that didn't help. There must be something else going on that I can't reproduce so far.
You could comment out or delete that test in the Path/PathTests/TestRefactoredTestPost.py file, if you wish.
If you want to help figure out what the problem is, you could add a "self.maxDiff = None" line to the setUp routine at approximately line 75 in the Path/PathTests/TestRefactoredTestPost.py file (above the "self.doc = FreeCAD.ActiveDocument" line). That should allow the error message to show the full difference between what is expected and what it got. If you could capture the full error message and PM it to me (or attach it to a reply) then I can figure out what it is unhappy about.
The fixes for terminal window column count and showing the full "diff" for errors have been merged into master with commit f42a47aa, pull request #7469.
LarryWoestman wrote: ↑Tue Sep 13, 2022 9:08 pm
The fixes for terminal window column count and showing the full "diff" for errors have been merged into master with commit f42a47aa, pull request #7469.