Acumos Python Model Runner Developer Guide

Testing

We use a combination of tox, pytest, and flake8 to test acumos_model_runner. Code which is not PEP8 compliant (aside from E501) will be considered a failing test. You can use tools like autopep8 to “clean” your code as follows:

$ pip install autopep8
$ cd python-model-runner
$ autopep8 -r --in-place --ignore E501 acumos_model_runner/ testing/ examples/

Run tox directly:

$ cd python-model-runner
$ tox

You can also specify certain tox environments to test:

$ tox -e py34  # only test against Python 3.4
$ tox -e flake8  # only lint code

And finally, you can run pytest directly in your environment (recommended starting place):

$ pytest
$ pytest -s   # verbose output