File tree 3 files changed +8
-16
lines changed
3 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def __init__(self, values) -> None:
88
88
elif hasattr (self , '_pa_array' ):
89
89
self ._pa_array = pa_data
90
90
else :
91
- raise ValueError (f"Unsupported pandas version: { pd .__version__ } " )
91
+ raise NotImplementedError (f"Unsupported pandas version: { pd .__version__ } " )
92
92
93
93
@classmethod
94
94
def _box_pa (
@@ -164,6 +164,8 @@ def pa_data(self):
164
164
return self ._data
165
165
elif hasattr (self , '_pa_array' ):
166
166
return self ._pa_array
167
+ else :
168
+ raise NotImplementedError (f"Unsupported pandas version: { pd .__version__ } " )
167
169
168
170
def _cmp_method (self , other , op ):
169
171
if op .__name__ == "eq" :
Original file line number Diff line number Diff line change 1
- # Make sure we test with pandas 1.3 .0. The Python version isn't that relevant.
2
- pandas==1.3.0
3
- numpy<2.0.0
1
+ # Make sure we test with pandas 1.5 .0. The Python version isn't that relevant.
2
+ pandas==1.5.3
3
+ numpy==1.24.0
Original file line number Diff line number Diff line change @@ -78,18 +78,8 @@ def test_getitems_when_iter_with_null():
78
78
assert pd .isna (result )
79
79
80
80
81
- def test_to_numpy ():
82
- s = pd .Series (db_dtypes .JSONArray ._from_sequence (JSON_DATA .values ()))
83
- data = s .to_numpy ()
84
- for id , key in enumerate (JSON_DATA .keys ()):
85
- if key == "null" :
86
- assert pd .isna (data [id ])
87
- else :
88
- assert data [id ] == json .dumps (JSON_DATA [key ], sort_keys = True )
89
-
90
-
91
81
def test_deterministic_json_serialization ():
92
82
x = {"a" : 0 , "b" : 1 }
93
83
y = {"b" : 1 , "a" : 0 }
94
- data = db_dtypes .JSONArray ._from_sequence ([x ])
95
- assert y in data
84
+ data = db_dtypes .JSONArray ._from_sequence ([y ])
85
+ assert data [ 0 ] == x
You can’t perform that action at this time.
0 commit comments