GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

Add a pygeosx unit test

Open sframba opened this issue 3 years ago • 3 comments

This PR adds the first unit test for the pygeosx python interface. This test runs a very simple wave propagation problem, handling the time loop in python. The test command directly executes the pygeosx python venv, and thus tests the python/C++ wrappers as well as the python script interface. Tested methods include problem initialization, explicit timestepping and seismogram trace retrieval. The test is only executed if ENABLE_PYGEOSX=true during cmake configuration.

sframba avatar May 05 '22 22:05 sframba

I am currently adding a test in my backward PR which is in python, maybe we can discuss (I use pytest, i didn't create the subdirectory which is a good idea, I have to create a wrapper to source pygeosx activate file before running my python script)

XL64 avatar Jun 22 '22 10:06 XL64

As a general note, this feels more like a pygeosx integrated test than a unit test.

We definitely need to add proper unit tests as well, which should test each of the components in isolation (to the highest degree possible). For these, I would recommend using the python unit test framework, similar to what we use here: https://github.com/GEOSX/GEOSX/blob/develop/src/coreComponents/python/modules/geosx_xml_tools_package/geosx_xml_tools/tests/test_manager.py

cssherman avatar Oct 20 '22 16:10 cssherman

@sframba Is this deprecated? If so, please close

rrsettgast avatar Jul 03 '24 01:07 rrsettgast