Commit Graph

11 Commits

Author SHA1 Message Date
luz.paz
8cfa85cf18 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
vocx-fc
2a4fb552ec Draft: move the TestDraft unit tests to separate modules
This results in better organization of the tests,
avoiding extremely big files.
2019-12-17 15:06:36 -03:00
luz.paz
ea0868a433 Fix typos and some trailing whitespace
Found via:  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2019-12-03 12:22:59 +01:00
vocx-fc
7bd3dc7b72 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.
2019-11-05 09:29:25 -03:00
vocx-fc
3abda3d5a7 Draft: improved Python style, checked with flake8 2019-07-26 10:54:01 -03:00
Jakub Tyszkowski
9d386f8f9a TestDraft: Fix testRotate and testOffset cases
Wire needs to be recomputed to update it's dimensions.
2019-04-09 12:08:45 -03:00
apeltauer
abf4d4ddf2 Change the name of the Wire object
After changing the name from DWire to Wire the test fails, because an element with the name DWire does not exists.
The name change came in with commit "917b5a505e8d5798a05c3c05cc7b4e052b2d05d5"
in file "src\Mod\Draft\Draft.py"
2018-11-05 19:24:02 +01:00
wmayer
1022fdd6a7 handle stricter tolerance of Vector3d for equality in Draft unit test 2017-01-23 17:42:15 +01:00
Stefan Tröger
503c4d00c0 Draft: Fix clone of art object 2016-12-11 19:27:35 +01:00
Yorik van Havre
3b8708ef71 Arch: Added test suite 2013-08-15 19:24:54 -03:00
Yorik van Havre
2aacbf46e1 Draft: Added test suite 2013-08-15 19:24:54 -03:00