|
3 | 3 | import pytest
|
4 | 4 | from pytest import approx
|
5 | 5 | from _plotly_utils.basevalidators import IntegerValidator
|
6 |
| -from plotly.tests.b64 import b64 |
7 | 6 | import numpy as np
|
8 | 7 | import pandas as pd
|
9 | 8 |
|
@@ -145,51 +144,6 @@ def test_acceptance_aok_list(val, validator_aok):
|
145 | 144 | assert np.array_equal(validator_aok.validate_coerce(val), val)
|
146 | 145 |
|
147 | 146 |
|
148 |
| -# Test base64 encoded arrays with array_ok=True |
149 |
| -INT_BASE64_TEST_CASES = [ |
150 |
| - # Note: we decided not to support int64 in plotly.js, |
151 |
| - # so the the max / min value are limited to int32 and the |
152 |
| - # dtype is cast to int32 in the output |
153 |
| - ( |
154 |
| - b64(np.array([-900000000, 900000000, 3], dtype="int64")), |
155 |
| - {"bdata": "ABdbygDppDUDAAAA", "dtype": "i4"}, |
156 |
| - ), |
157 |
| - ( |
158 |
| - b64(np.array([-900000000, 900000000, 3], dtype="int32")), |
159 |
| - {"bdata": "ABdbygDppDUDAAAA", "dtype": "i4"}, |
160 |
| - ), |
161 |
| - ( |
162 |
| - b64(np.array([32767, -32767, 3], dtype="int16")), |
163 |
| - {"bdata": "/38BgAMA", "dtype": "i2"}, |
164 |
| - ), |
165 |
| - ( |
166 |
| - b64(np.array([127, -127, 3], dtype="int8")), |
167 |
| - {"bdata": "f4ED", "dtype": "i1"}, |
168 |
| - ), |
169 |
| - ( |
170 |
| - b64(np.array([900000000, 2, 3], dtype="uint64")), |
171 |
| - {"bdata": "AOmkNQIAAAADAAAA", "dtype": "u4"}, |
172 |
| - ), |
173 |
| - ( |
174 |
| - b64(np.array([900000000, 2, 3], dtype="uint32")), |
175 |
| - {"bdata": "AOmkNQIAAAADAAAA", "dtype": "u4"}, |
176 |
| - ), |
177 |
| - ( |
178 |
| - b64(np.array([32767, 0, 3], dtype="uint16")), |
179 |
| - {"bdata": "/38AAAMA", "dtype": "u2"}, |
180 |
| - ), |
181 |
| - ( |
182 |
| - b64(np.array([127, 2, 3], dtype="uint8")), |
183 |
| - {"bdata": "fwID", "dtype": "u1"}, |
184 |
| - ), |
185 |
| -] |
186 |
| - |
187 |
| - |
188 |
| -@pytest.mark.parametrize("val, expected", INT_BASE64_TEST_CASES) |
189 |
| -def test_acceptance_aok_base64(val, expected, validator_aok): |
190 |
| - assert np.array_equal(validator_aok.validate_coerce(val), expected) |
191 |
| - |
192 |
| - |
193 | 147 | # ### Coerce ###
|
194 | 148 | # Coerced to general consistent numeric type
|
195 | 149 | @pytest.mark.parametrize(
|
|
0 commit comments