Local Testing - staglibrary/stagpy GitHub Wiki

This document describes the process of testing changes to the stagpy module locally.

Generating the C++ wrapper

If you make any changes to the SWIG code used to generate the wrapper, you will need to regenerate the code with

swig -c++ -python -verbose stag_internal.i

from the stag directory. This will update the files

  • stag_internal.py
  • stag_internal_wrap.cxx
  • stag_internal_wrap.h.

Building the module locally

In order to compile the C++ code and install the python module locally for testing, from the root stagpy directory, run

python setup.py build_ext --inplace

Running the automated tests

To run the automated tests:

cd test
pytest