Skip to content

Commit 6fa020d

Browse files
committed
Add a test for invalid arguments of set_display()
1 parent 9c17112 commit 6fa020d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pygmt/tests/test_figure.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import numpy as np
99
import numpy.testing as npt
1010
import pytest
11-
from pygmt import Figure
11+
from pygmt import Figure, set_display
1212
from pygmt.exceptions import GMTInvalidInput
1313

1414

@@ -174,3 +174,12 @@ def test_figure_show_invalid_method():
174174
fig.basemap(region="10/70/-300/800", projection="X3i/5i", frame="af")
175175
with pytest.raises(GMTInvalidInput):
176176
fig.show(method="test")
177+
178+
179+
def test_figure_set_display_invalid():
180+
"""
181+
Test to check if an error is raised when an invalid method is passed to
182+
set_display.
183+
"""
184+
with pytest.raises(GMTInvalidInput):
185+
set_display(method="invalid")

0 commit comments

Comments
 (0)