Skip to content

Commit 75f61e3

Browse files
author
Meghan Jones
committed
Use pytest-doctestplus for skipping doctests
1 parent ace9916 commit 75f61e3

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

pygmt/src/grdhisteq.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
)
1717
from pygmt.io import load_dataarray
1818

19+
__doctest_skip__ = ["grdhisteq.*"]
20+
1921

2022
class grdhisteq: # pylint: disable=invalid-name
2123
r"""
@@ -187,16 +189,14 @@ def equalize_grid(
187189
188190
Example
189191
-------
190-
>>> import pygmt # doctest: +SKIP
192+
>>> import pygmt
191193
>>> # Load a grid of @earth_relief_30m data, with an x-range of 10 to
192194
>>> # 30, and a y-range of 15 to 25
193195
>>> grid = pygmt.datasets.load_earth_relief(
194196
... resolution="30m", region=[10, 30, 15, 25]
195-
... ) # doctest: +SKIP
197+
... )
196198
>>> # Create a new grid with a Gaussian data distribution
197-
>>> grid = pygmt.grdhisteq.equalize_grid(
198-
... grid=grid, gaussian=True
199-
... ) # doctest: +SKIP
199+
>>> grid = pygmt.grdhisteq.equalize_grid(grid=grid, gaussian=True)
200200
201201
See Also
202202
-------
@@ -288,18 +288,16 @@ def compute_bins(
288288
289289
Example
290290
-------
291-
>>> import pygmt # doctest: +SKIP
291+
>>> import pygmt
292292
>>> # Load a grid of @earth_relief_30m data, with an x-range of 10 to
293293
>>> # 30, and a y-range of 15 to 25
294294
>>> grid = pygmt.datasets.load_earth_relief(
295295
... resolution="30m", region=[10, 30, 15, 25]
296-
... ) # doctest: +SKIP
296+
... )
297297
>>> # Find elevation intervals that splits the data range into 5
298298
>>> # divisions, each of which have an equal area in the original grid.
299-
>>> bins = pygmt.grdhisteq.compute_bins(
300-
... grid=grid, divisions=5
301-
... ) # doctest: +SKIP
302-
>>> print(bins) # doctest: +SKIP
299+
>>> bins = pygmt.grdhisteq.compute_bins(grid=grid, divisions=5)
300+
>>> print(bins)
303301
start stop
304302
bin_id
305303
0 179.0 397.5

0 commit comments

Comments
 (0)