Commit Graph

18 Commits

Author SHA1 Message Date
Roy-043
88804819c0 Draft: comment out 3 test files with only dummy tests
Some Draft test files contain only dummy tests (`aux.fake_function`). Running them will just open a new file and then immediately close it. This can result in issues with code that is called with a delay. See #18679. Disabling these tests by commenting them out avoids this.
2025-01-04 12:20:33 +01:00
wmayer
fe9e54d7d8 Draft: add unit test for issue #9912 2023-07-24 13:55:28 +02:00
alafr
5bf974a0e8 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
2ae2129383 Draft: test for DraftGeomUtils.get_extended_wire 2020-10-31 14:17:05 +01:00
vocx-fc
604de5c5b2 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
d40bf0d5e8 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
4ed4e2d496 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
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