Skip to content

Commit e2a8ceb

Browse files
committed
Remove test_data_kind_fails because it's already covered by validate_data_input doctests
1 parent e79a7d0 commit e2a8ceb

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

pygmt/helpers/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ def validate_data_input(
7979
Traceback (most recent call last):
8080
...
8181
pygmt.exceptions.GMTInvalidInput: Too much data. Use either data or x/y/z.
82+
>>> validate_data_input(data="infile", x=[1, 2, 3], y=[4, 5, 6])
83+
Traceback (most recent call last):
84+
...
85+
pygmt.exceptions.GMTInvalidInput: Too much data. Use either data or x/y/z.
8286
>>> validate_data_input(data="infile", z=[7, 8, 9])
8387
Traceback (most recent call last):
8488
...

pygmt/tests/test_helpers.py

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@
44

55
from pathlib import Path
66

7-
import numpy as np
87
import pytest
98
import xarray as xr
109
from pygmt import Figure
1110
from pygmt.exceptions import GMTInvalidInput
12-
from pygmt.helpers import (
13-
GMTTempFile,
14-
args_in_kwargs,
15-
data_kind,
16-
kwargs_to_strings,
17-
unique_name,
18-
)
11+
from pygmt.helpers import GMTTempFile, args_in_kwargs, kwargs_to_strings, unique_name
1912
from pygmt.helpers.testing import load_static_earth_relief, skip_if_no
2013

2114

@@ -32,25 +25,6 @@ def test_load_static_earth_relief():
3225
assert isinstance(data, xr.DataArray)
3326

3427

35-
@pytest.mark.parametrize(
36-
("data", "x", "y"),
37-
[
38-
(None, None, None),
39-
("data.txt", np.array([1, 2]), np.array([4, 5])),
40-
("data.txt", np.array([1, 2]), None),
41-
("data.txt", None, np.array([4, 5])),
42-
(None, np.array([1, 2]), None),
43-
(None, None, np.array([4, 5])),
44-
],
45-
)
46-
def test_data_kind_fails(data, x, y):
47-
"""
48-
Make sure data_kind raises exceptions when it should.
49-
"""
50-
with pytest.raises(GMTInvalidInput):
51-
data_kind(data=data, x=x, y=y)
52-
53-
5428
def test_unique_name():
5529
"""
5630
Make sure the names are really unique.

0 commit comments

Comments
 (0)