From a24005c804ec872dbf392269eb213e285438369c Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Mon, 28 Dec 2020 09:26:28 +0000 Subject: [PATCH 1/4] Update test_coast_aliases() for all included aliases in v0.2.1 and change test type to use @check_figures_equal --- pygmt/tests/test_coast.py | 54 +++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/pygmt/tests/test_coast.py b/pygmt/tests/test_coast.py index fa9526e161b..33b2b6b3ec2 100644 --- a/pygmt/tests/test_coast.py +++ b/pygmt/tests/test_coast.py @@ -37,23 +37,49 @@ def test_coast_iceland(): return fig_ref, fig_test -@pytest.mark.mpl_image_compare +@check_figures_equal() def test_coast_aliases(): "Test that all aliases work" - fig = Figure() - fig.coast( - region="-30/30/-40/40", - projection="m0.1i", - frame="afg", - rivers="1/1p,black", - borders="1/0.5p,-", - shorelines="0.25p,white", - land="moccasin", - water="skyblue", - resolution="i", - area_thresh=1000, + fig_ref, fig_test = Figure(), Figure() + fig_ref.coast( + R="-30/30/-40/40", + J="M25c", + B="afg", + I="1/1p,black", + N="1/0.5p,-", + W="0.25p,white", + G="moccasin", + S="skyblue", + D="i", + A=1000, + L="jMM+c1+w1000k+f+l", + U=True, + V="q", + X="a4c", + Y="a10c", + p="135/25", + t=13, ) - return fig + fig_test.coast( + region=[-30, 30, -40, 40], # R + projection="M25c", # J + frame="afg", # B + rivers="1/1p,black", # I + borders="1/0.5p,-", # N + shorelines="0.25p,white", # W + land="moccasin", # G + water="skyblue", # S + resolution="i", # D + area_thresh=1000, # A + map_scale="jMM+c1+w1000k+f+l", # L + timestamp=True, # U + verbose="q", # V + xshift="a4c", # X + yshift="a10c", # Y + perspective=[135, 25], # p + transparency=13, # t + ) + return fig_ref, fig_test @pytest.mark.mpl_image_compare From cacb8be86118157a09af18a2e16ed3b45b6feb86 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 2 Jan 2021 08:47:57 +0000 Subject: [PATCH 2/4] Updating map scale anchor in alias test of test_coast.py --- pygmt/tests/test_coast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/tests/test_coast.py b/pygmt/tests/test_coast.py index 33b2b6b3ec2..d828e3e9953 100644 --- a/pygmt/tests/test_coast.py +++ b/pygmt/tests/test_coast.py @@ -52,7 +52,7 @@ def test_coast_aliases(): S="skyblue", D="i", A=1000, - L="jMM+c1+w1000k+f+l", + L="jCM+c1+w1000k+f+l", U=True, V="q", X="a4c", @@ -71,7 +71,7 @@ def test_coast_aliases(): water="skyblue", # S resolution="i", # D area_thresh=1000, # A - map_scale="jMM+c1+w1000k+f+l", # L + map_scale="jCM+c1+w1000k+f+l", # L timestamp=True, # U verbose="q", # V xshift="a4c", # X From d0abbf95ee48c50b4b18735e7a6231c80215acd8 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 2 Jan 2021 08:56:52 +0000 Subject: [PATCH 3/4] Update pygmt/tests/test_coast.py Co-authored-by: Dongdong Tian --- pygmt/tests/test_coast.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pygmt/tests/test_coast.py b/pygmt/tests/test_coast.py index d828e3e9953..0a2b6518b30 100644 --- a/pygmt/tests/test_coast.py +++ b/pygmt/tests/test_coast.py @@ -73,7 +73,6 @@ def test_coast_aliases(): area_thresh=1000, # A map_scale="jCM+c1+w1000k+f+l", # L timestamp=True, # U - verbose="q", # V xshift="a4c", # X yshift="a10c", # Y perspective=[135, 25], # p From ca510d5e4fea7d8ce0c6819ba0997775c7b6cc31 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 2 Jan 2021 08:56:58 +0000 Subject: [PATCH 4/4] Update pygmt/tests/test_coast.py Co-authored-by: Dongdong Tian --- pygmt/tests/test_coast.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pygmt/tests/test_coast.py b/pygmt/tests/test_coast.py index 0a2b6518b30..1098409db57 100644 --- a/pygmt/tests/test_coast.py +++ b/pygmt/tests/test_coast.py @@ -54,7 +54,6 @@ def test_coast_aliases(): A=1000, L="jCM+c1+w1000k+f+l", U=True, - V="q", X="a4c", Y="a10c", p="135/25",