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:
doctest : bool

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

verbose : bool

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

coverage : bool

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

figures : bool

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.