diff --git a/doc/install.rst b/doc/install.rst
index c8c3e97c7..32d7729e4 100644
--- a/doc/install.rst
+++ b/doc/install.rst
@@ -84,19 +84,3 @@ The examples in the :ref:`gallery` also use:
* `ensaio `__ for downloading sample datasets
* `pygmt `__ for plotting maps
* `pyproj `__ for cartographic projections
-
-
-Testing your install
---------------------
-
-We ship a full test suite with the package.
-To run the tests, you'll need to install some extra dependencies first:
-
-* `pytest `__
-* `boule `__
-
-After that, you can test your installation by running the following inside
-a Python interpreter::
-
- import harmonica
- harmonica.test()
diff --git a/harmonica/__init__.py b/harmonica/__init__.py
index 4902d8f23..c61fe3f64 100644
--- a/harmonica/__init__.py
+++ b/harmonica/__init__.py
@@ -34,51 +34,3 @@
# Append a leading "v" to the generated version by setuptools_scm
__version__ = f"v{__version__}"
-
-
-def test(doctest=True, verbose=True, coverage=False, figures=False):
- """
- Run the test suite.
-
- Uses `py.test `__ to discover and run the tests.
-
- 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.
-
- """
- import pytest
-
- package = __name__
- args = []
- if verbose:
- args.append("-vv")
- if coverage:
- args.append("--cov={}".format(package))
- args.append("--cov-report=term-missing")
- if doctest:
- args.append("--doctest-modules")
- if figures:
- args.append("--mpl")
- args.append("--pyargs")
- args.append(package)
- status = pytest.main(args)
- assert status == 0, "Some tests have failed."