Normalize some testing resources for the Python packages.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Thu, 5 Sep 2019 12:05:16 +0000 (15:05 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 11 Sep 2019 11:27:44 +0000 (13:27 +0200)
commit503e12717cbbb00cbbed2cdf700013106b0023c2
tree0883a1c6e8aa0febf96c66397f4e25e6a91b619f
parent6857a910653f9916fbb6085dd428a86645eb7138
Normalize some testing resources for the Python packages.

* Add a gmxapi.testsupport submodule.
  Move the pytesthelpers.py test support module to the new
  gmxapi.testsupport module.
* Remove unused details in sample_restraint/tests. mpi4py was imported
  unnecessarily, and some directories created, but that was left over
  from older versions of the test.
* Remove pytest.ini for gmxapi Python package tests.
  These values can be set on the command line, and having them in the
  pytest.ini adds developer overhead when trying to determine default
  behavior or get custom behavior. In the future, consider per-test
  configuration through the caplog pytest fixture, or various command
  line options.

gmxapi and sample_restraint Python packages can now use essentially
identical pytest testing framework. This change synchronizes the
testing frameworks. Future changes can combine some of the facilities
for simplification and ease of maintenance.

Future changes could address the following.
* Move some pytest scripting to gmxapi package resources.
* Combine the Python and C++ resources for the test input file in
  sample_restraint.
* Retrieve test data directly from the GROMACS installation.
* gmxapi.testsupport could alternatively be a separate optional package.
* More facilities can be provided, such as the test input file.

Change-Id: Ia745c75aecd97e3a8fc3053b424aa40d4c89de32
python_packaging/sample_restraint/tests/CMakeLists.txt
python_packaging/sample_restraint/tests/conftest.py
python_packaging/sample_restraint/tests/test_binding.py
python_packaging/sample_restraint/tests/testdata.json [new file with mode: 0644]
python_packaging/src/gmxapi/testsupport.py [moved from python_packaging/src/test/pytesthelpers.py with 97% similarity]
python_packaging/src/test/conftest.py
python_packaging/src/test/pytest.ini [deleted file]
python_packaging/src/test/test_mdrun.py