From aa368eefefbd3e8b4487020fecf448c8c9fd05c0 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Sat, 23 May 2020 12:35:06 +0200 Subject: [PATCH] FEM: unit test information, update --- src/Mod/Fem/femtest/test_information.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/femtest/test_information.md b/src/Mod/Fem/femtest/test_information.md index 77520c6d3d..33eda7f6ff 100644 --- a/src/Mod/Fem/femtest/test_information.md +++ b/src/Mod/Fem/femtest/test_information.md @@ -15,11 +15,12 @@ ## unit test command to copy - to run a specific FEM unit test to copy for fast tests :-) - they can be found in file test_commands_to_copy.md -- greate them by +- create them by ```python from femtest.app.support_utils import get_fem_test_defs get_fem_test_defs() + ``` ## examples from within FreeCAD: @@ -27,26 +28,31 @@ get_fem_test_defs() ```python import Test, femtest.app.test_object Test.runTestsFromClass(femtest.app.test_object.TestObjectCreate) + ``` ### all FEM tests ```python import Test, TestFemApp Test.runTestsFromModule(TestFemApp) + import Test, TestFemGui Test.runTestsFromModule(TestFemGui) + ``` ### module ```python import Test, femtest.app.test_common Test.runTestsFromModule(femtest.app.test_common) + ``` ### class ```python import Test, femtest.app.test_common Test.runTestsFromClass(femtest.app.test_common.TestFemCommon) + ``` ### method @@ -55,6 +61,7 @@ import unittest thetest = "femtest.app.test_common.TestFemCommon.test_pyimport_all_FEM_modules" alltest = unittest.TestLoader().loadTestsFromName(thetest) unittest.TextTestRunner().run(alltest) + ``` ## examples from shell in build dir: