Skip to content

Commit 7e3ff59

Browse files
committed
wip
1 parent bd70a19 commit 7e3ff59

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

pandas/tests/arrays/test_numpy.py

+19-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
import pandas.util._test_decorators as td
99

1010
import pandas as pd
11-
from pandas.core.arrays import PandasArray
11+
from pandas.arrays import PandasArray
12+
from pandas.core.arrays.numpy_ import PandasDtype
1213
import pandas.util.testing as tm
1314

1415

@@ -96,3 +97,20 @@ def test_series_constructor_with_astype():
9697
result = pd.Series(PandasArray(ndarray), dtype="float64")
9798
expected = pd.Series([1.0, 2.0, 3.0], dtype="float64")
9899
tm.assert_series_equal(result, expected)
100+
101+
102+
@pytest.mark.parametrize('dtype, expected', [
103+
('bool', True),
104+
('int', True),
105+
('uint', True),
106+
('float', True),
107+
('complex', True),
108+
('str', False),
109+
('bytes', False),
110+
('datetime64[ns]', False),
111+
('object', False),
112+
('void', False)
113+
])
114+
def test_is_numeric(dtype, expected):
115+
dtype = PandasDtype(dtype)
116+
assert dtype._is_numeric is expected

0 commit comments

Comments
 (0)