SofaPython3 icon indicating copy to clipboard operation
SofaPython3 copied to clipboard

Add two testing features

Open damienmarchal opened this issue 1 year ago • 0 comments

Feature 1: Currently when loading unittest (for python) into gtest (c++), a failure while loading the test in python does not generates a test failure which is problematic as load time error will be unnoticed. The PR transform the loading of a python file containing unittest as real test in the gtest framework. The consequence is that a failure to load the file is not more ignored but reported as a gtest failure in the following way: image

Feature 2: Adds method import_sofa_python_scene(path_to_scene : str) in the python package Sofa

The introduced method loads dynamically python module containing a scene and returns it.
This allows to do:

scene = import_sofa_python_scene("myscene.py")
root = scene.createScene(Sofa.Core.Node("root"))
...
root.addObject(....)

damienmarchal avatar Jul 12 '24 15:07 damienmarchal