SofaPython3
SofaPython3 copied to clipboard
Add two testing features
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:
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(....)