Skip to content

Commit a8fee8b

Browse files
authored
Fix the failing test test_config() (#548)
Moves `config()` after `pygmt.Figure()` to change the settings of current figure only.
1 parent 32c4d4a commit a8fee8b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pygmt/tests/test_config.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,14 @@
66
from .. import Figure, config
77

88

9-
@pytest.mark.xfail(
10-
reason="Baseline image not updated to use earth relief grid in GMT 6.1.0",
11-
)
129
@pytest.mark.mpl_image_compare
1310
def test_config():
1411
"""
1512
Test if config works globally and locally.
1613
"""
17-
# Change global settings
18-
config(FONT_ANNOT_PRIMARY="blue")
1914
fig = Figure()
15+
# Change global settings of current figure
16+
config(FONT_ANNOT_PRIMARY="blue")
2017
fig.basemap(
2118
region="0/10/0/10", projection="X10c/10c", frame=["af", '+t"Blue Annotation"']
2219
)
@@ -35,7 +32,7 @@ def test_config():
3532
frame=["af", '+t"Blue Annotation"'],
3633
X="15c",
3734
)
38-
# Revert to default settings
35+
# Revert to default settings in current figure
3936
config(FONT_ANNOT_PRIMARY="black")
4037
return fig
4138

0 commit comments

Comments
 (0)