9
9
ColorValidator ,
10
10
)
11
11
12
+ from plotly .tests .b64 import _b64
13
+
12
14
13
15
@pytest .fixture
14
16
def data_array_validator (request ):
@@ -91,7 +93,7 @@ def test_numeric_validator_numeric_pandas(number_validator, numeric_pandas):
91
93
res = number_validator .validate_coerce (numeric_pandas )
92
94
93
95
# Check type
94
- assert isinstance (res , np . ndarray )
96
+ assert isinstance (res , object )
95
97
96
98
# Check dtype
97
99
assert res .dtype == numeric_pandas .dtype
@@ -104,7 +106,7 @@ def test_integer_validator_numeric_pandas(integer_validator, numeric_pandas):
104
106
res = integer_validator .validate_coerce (numeric_pandas )
105
107
106
108
# Check type
107
- assert isinstance (res , np . ndarray )
109
+ assert isinstance (res , object )
108
110
109
111
# Check dtype
110
112
if numeric_pandas .dtype .kind in ("u" , "i" ):
@@ -122,10 +124,12 @@ def test_data_array_validator(data_array_validator, numeric_pandas):
122
124
res = data_array_validator .validate_coerce (numeric_pandas )
123
125
124
126
# Check type
125
- assert isinstance (res , np .ndarray )
127
+ assert isinstance (res , object )
128
+
129
+ numeric_pandas = _b64 (numeric_pandas )
126
130
127
131
# Check dtype
128
- assert res . dtype == numeric_pandas . dtype
132
+ assert res [ " dtype" ] == numeric_pandas [ " dtype" ]
129
133
130
134
# Check values
131
135
np .testing .assert_array_equal (res , numeric_pandas )
0 commit comments