File tree Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Expand file tree Collapse file tree 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:
8888 elif hasattr (self , '_pa_array' ):
8989 self ._pa_array = pa_data
9090 else :
91- raise ValueError (f"Unsupported pandas version: { pd .__version__ } " )
91+ raise NotImplementedError (f"Unsupported pandas version: { pd .__version__ } " )
9292
9393 @classmethod
9494 def _box_pa (
@@ -164,6 +164,8 @@ def pa_data(self):
164164 return self ._data
165165 elif hasattr (self , '_pa_array' ):
166166 return self ._pa_array
167+ else :
168+ raise NotImplementedError (f"Unsupported pandas version: { pd .__version__ } " )
167169
168170 def _cmp_method (self , other , op ):
169171 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():
7878 assert pd .isna (result )
7979
8080
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-
9181def test_deterministic_json_serialization ():
9282 x = {"a" : 0 , "b" : 1 }
9383 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