FreeCAD: master 0347a4b7

Author Committer Branch Timestamp Parent
vocx-fc yorik master 2019-09-15 09:09:19 master 69b98c48
Changeset Draft: TestDraft, refactor unit tests, 66 in total.

Only 50 test are really performed.

Some tests are not fully implemented, for example, arc_3points, dimension_radial,
shapestring, trim, extend, and stretch. The reason is that there are no proper
functions to test.
In order to have a unit test, basic functions that perform these actions
must be written inside Draft.py. At the moment, these tests just
run a _fake_function() which always returns successfully
and thus the test always passes without problem.

There are also tests for the import and export
of SVG, DXF, DWG, and OCA files. Currently these are also not implemented.
Sample files could be provided in the source tree in order to test basic operations
like opening, import, and export.
A complete unit test would require writing a test for each geometrical element
that could be imported and exported, that is, line, circle, arc, rectangle, etc.

These tests are inspired by the tests in the FEM workbench.
Import of modules is tested, as well as the creation and modification tools.
Eventually, the tests should be migrated to individual modules,
and test files should be provided to serve as reference.
mod - src/Mod/Draft/TestDraft.py Diff File