Testing#

emsarray uses tox to run all the test and linting tools. Python tests use the pytest framework, mypy is used for type checking, flake8 and isort check the code formatting, and the documentation is build using sphinx

Setup#

To install all the testing tools, install emsarray in to a virtual environment with the [testing] extra.

$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install --upgrade pip
$ pip3 install -r requirements.txt -e .[testing]

Running all the tests#

Invoke tox to run all the tests:

$ tox

Running Python tests#

You can invoke pytest directly to run just a subset of the tests. For example, to only run the tests in tests/operations.py:

$ pytest tests/test_operations.py