From 9382c9fae5ca2f61148153eec49e5e6a87bb6fe2 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Tue, 11 Aug 2020 10:01:50 +1200 Subject: [PATCH 1/3] Revert runfirst workaround for test_grdimage_over_dateline --- Makefile | 6 +----- pygmt/tests/test_grdimage.py | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Makefile b/Makefile index cb27e1d9a3d..3f643a7d2ad 100644 --- a/Makefile +++ b/Makefile @@ -29,11 +29,7 @@ test: @echo "" @cd $(TESTDIR); python -c "import $(PROJECT); $(PROJECT).show_versions()" @echo "" - # There are two steps to the test here because `test_grdimage_over_dateline` - # passes only when it runs before the other tests. - # See also https://github.com/GenericMappingTools/pygmt/pull/476 - cd $(TESTDIR); pytest -m runfirst $(PYTEST_ARGS) $(PROJECT) - cd $(TESTDIR); pytest -m 'not runfirst' $(PYTEST_ARGS) $(PROJECT) + cd $(TESTDIR); pytest $(PYTEST_ARGS) $(PROJECT) cp $(TESTDIR)/coverage.xml . cp -r $(TESTDIR)/htmlcov . rm -r $(TESTDIR) diff --git a/pygmt/tests/test_grdimage.py b/pygmt/tests/test_grdimage.py index 37b5fca822a..8f4398ff8fd 100644 --- a/pygmt/tests/test_grdimage.py +++ b/pygmt/tests/test_grdimage.py @@ -76,10 +76,6 @@ def test_grdimage_fails(): fig.grdimage(np.arange(20).reshape((4, 5))) -# This test needs to run first before the other tests (on Linux at least) so -# that a black image isn't plotted due to an `inf` value when resampling. -# See also https://github.com/GenericMappingTools/pygmt/pull/476 -@pytest.mark.runfirst @pytest.mark.mpl_image_compare def test_grdimage_over_dateline(xrgrid): """ From 2dcea794fb092327060b40a0050803464dc9bc8e Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Thu, 3 Sep 2020 11:36:59 +1200 Subject: [PATCH 2/3] Revert grdtrack example workaround in #531 crashing due to bad meridian --- examples/gallery/grid/track_sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/grid/track_sampling.py b/examples/gallery/grid/track_sampling.py index 0c01d099eab..66bd9cb2316 100644 --- a/examples/gallery/grid/track_sampling.py +++ b/examples/gallery/grid/track_sampling.py @@ -24,7 +24,7 @@ fig = pygmt.Figure() # Plot the earth relief grid on Cylindrical Stereographic projection, masking land areas -fig.basemap(region="d", frame=True, projection="Cyl_stere/8i") +fig.basemap(region="g", frame=True, projection="Cyl_stere/150/-20/8i") fig.grdimage(grid=grid, cmap="gray") fig.coast(land="#666666") # Plot using circles (c) of 0.15cm, the sampled bathymetry points From 90b8770c3517074baabdf331e80c43d55bf5415e Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Fri, 4 Sep 2020 14:18:09 +1200 Subject: [PATCH 3/3] Remove unneeded pytest mpl_image_compare and runfirst markers --- setup.cfg | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 812f2e81962..deac1a59a36 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,8 +12,3 @@ max-line-length = 88 max-doc-length = 79 exclude = pygmt/_version.py - -[tool:pytest] -markers = - mpl_image_compare: compare generated plots with correct baseline version - runfirst: runs the test(s) first before the other ones