New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python unittest enhancements and source documentation #60
base: femdev
Are you sure you want to change the base?
Conversation
AFAIK for 0.19 yes. Even if we force developer and user to use Python 3 On all other stuff. I will have a look and give some feedback. |
Since it help s a test module and it is new I do not think we need py2 support. The time we need to get all this into FC py2 might be obsolete. It will take some time, but we need to get started somdhow ... Lets do a simple one. I saw you moved from testfiles to data directory. Is it posible to extract this to a separete commit? I would just merge this into master. |
damn lots of merge conflicts ... |
Would it be possible to split it in two PRs one only FEM related commits? We could these merge really easily. But the not FEM related test commits needs to be disscussed first. It would even be much simpler to disscuss these commits if they would be without all these FEM changes. The FEM changes need only to be reviewed from my side. I even can merge them into master directly. It is really a pity I have been overoveroverloaded last few month ... there is some cools stuff inside ... cheers bernd |
if you replace a print with a FreeCAD.Console.PrintWhatever you need to add a new line because it is not added like print it does. BTW: this replacement is one of the last remaining FEM code formating. Have you noticed https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Fem/coding_conventions.md |
Alright lets do this. First let me check where all those merge conflicts come from. There haven't been any a few weeks ago. |
mainly my code formmating replacing all ' by " |
Oh, thats troublesome... I think I have to resolve all that by hand than. Well, I'll be back in an hour or so :P |
Alright I resolved everything. I couldn't test anything cause my FreeCAD build need to completely recompile which takes ~30min on my notebook. |
cool I will have a look. I allready saw some commits I would like to cherry-pick. Have you seen https://forum.freecadweb.org/viewtopic.php?t=36682 |
still there are lots of problems in the rebase I solve a few here ... hopefully ... FreeCAD#2549 |
I know I'm solving them right now. Those are just some merge mistakes. |
I merged all changes not related to your new test suite. cd8f0e0 |
I had to splitt some commits. Hopefully you get it all together again. |
btw: somehow your github email does not fit with your git email. AFAIK you could even set it to some strange mail just to get you found in github as a contributor |
How about a rebase Markus? |
Yes, will do. I'm quite busy atm sorry... I'll do it tomorrow. |
AFAIKT you should only have changes left in the regard of the new test tool, means new code and only a few code changes. Most of the code changes ATM are changes which change stuff back to how it was in summer. cheers bernd |
ping |
Still here, just very busy with studying, sorry... I'll going to look though it now |
I did a rebase. Would you give this a try? https://github.com/berndhahnebach/FreeCAD_bhb/commits/gsoctestpy2 do not forget the 2 at branch end |
made some code formatting and added some licence header. |
something is broken in the old FEM tests! How do I run the new FEM tests? Should we move disscussion to the forum? |
I have a few hours to spare today. Please don't apply anything (from the GSoC Stuff) to femdev otherwise I have to start over again. |
For sure I will not :-) I cherry picked your commits. It took me just half an hour. See https://github.com/berndhahnebach/FreeCAD_bhb/commits/gsoctestpy2 |
Thanks! The rebase is now finished and for me everything works. I just pulled the changes from yesterday and today and for some reason the recompile takes quite long now. I have to go to work now but when I come home I'll do one test run and if everything works I'll push it. It took a little longer because I also fixed stuff and cleaned up the history a bit. |
The support module provides base classes for FreeCAD unittest TestCase classes. It does stuff like providing FreeCAD specific asserts and automatic document management.
7a1c930
to
4f8174a
Compare
460efa3
to
4f8174a
Compare
4f8174a
to
b4578fb
Compare
4f8174a
to
4904ab5
Compare
4904ab5
to
4f8174a
Compare
This pull request includes changes concerning all of FreeCAD (inside the Mod/Test module) and changes that concern mainly the fem module. See the source/file documentation for more info on the new modules.
There are new test support modules for App tests (AppTestSupport) and Gui tests (GuiTestSupport) in the Mod/Test module. This should be useful for all of FreeCADs python unit tests.
Test modules are now in sub packages of the femtest package. femtest.app contains all test modules which don't need a gui to run. femtest.gui contains all tests that require a gui to run. The test files are in femtest/data. The packages use the load_tests protocol so they can be used as targets when executing tests (e.g. FreeCADCmd -t femtest). This could replace the TestFem module. The packages automatically find all test (they don't need to be listed again).
Test coverage of the python source can now be measured by using the --cov option in addition to the -t option. See the documentation of src/App/FreeCADTest for more detail. coverage.py must be installed.
I don't expect that this pull request is just merged without some tweaking. I'll be available for at least a month and I intend to work on testing and documentation of FreeCAD for much longer than that. This branch doesn't work properly with python2. Is that still a requirement?