pygmt.test

pygmt.test(doctest=True, verbose=True, coverage=False, figures=True)[source]

Run the test suite.

Uses py.test to discover and run the tests. If you haven’t already, you can install it with conda or pip.

Parameters
doctestbool

If True, will run the doctests as well (code examples that start with a >>> in the docs).

verbosebool

If True, will print extra information during the test run.

coveragebool

If True, will run test coverage analysis on the code as well. Requires pytest-cov.

figuresbool

If True, will test generated figures against saved baseline figures. Requires pytest-mpl and matplotlib.

Raises
AssertionError

If pytest returns a non-zero error code indicating that some tests have failed.