Commit Graph

16 Commits

Author SHA1 Message Date
alafr
d4b65cffff Draft: Conform to vocx-fc's review
- check for Part.Shape as it was before, to avoid any risk of breaking other tools
- change the order of Draft tests
2020-10-31 14:17:21 +01:00
alafr
5aa68ea294 Draft: test for DraftGeomUtils.get_extended_wire 2020-10-31 14:17:05 +01:00
vocx-fc
e9baea434e Draft: update snake_case for unit tests
Also fix the name of certain functions.

Do not import `DraftFillet` any more as it's just kept
for compatibility purposes.

Do not test OCA nor AirfoilDAT as it's very improbable
that these formats will gain more support any time soon.
2020-05-15 14:44:48 +02:00
vocx-fc
26864d9633 Draft: moved some unit tests to TestDraftGui
Those unit tests that are registered in `Init.py` will always run,
while those that are registerd in `InitGui.py` will only run
when the graphical interface is available.

This allows us to more clearly distinguish functions that
should be able to run always, from those that may run only
when the interfce is available.
2020-04-08 11:07:51 +02:00
vocx-fc
c55a5a9146 Draft: unit tests registered in Init.py
This means that now the unit tests will run from
the console mode when using
```
FreeCADCmd -t 0
FreeCAD --console -t 0
```

This will allow us to catch errors more easily,
as we separate better the behavior of non-GUI
and GUI-required modules.

Also small spacing fixes and position of the license.
2020-04-08 11:07:51 +02:00
luz.paz
ae7cb9e300 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
fa73d29d84 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
379d041664 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
0347a4b7a6 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
edaf03b0a4 Draft: improved Python style, checked with flake8 2019-07-26 10:54:01 -03:00
Jakub Tyszkowski
9b3ffef570 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
d03a11ead9 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 "684b4ab03a27231e0cc603ca815bf9ea367fd0b9"
in file "src\Mod\Draft\Draft.py"
2018-11-05 19:24:02 +01:00
wmayer
417f074aff handle stricter tolerance of Vector3d for equality in Draft unit test 2017-01-23 17:42:15 +01:00
Stefan Tröger
9bb3193395 Draft: Fix clone of art object 2016-12-11 19:27:35 +01:00
Yorik van Havre
578fefc9b1 Arch: Added test suite 2013-08-15 19:24:54 -03:00
Yorik van Havre
efe6abb54f Draft: Added test suite 2013-08-15 19:24:54 -03:00