File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2024 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+
16+ import datetime as dt
17+ from typing import Optional
18+
19+ import pandas
20+ import pandas .api .extensions
21+ import pandas .testing
22+ import pyarrow
23+ import pytest
24+
25+ import packaging .version
26+
27+ import db_dtypes
28+
29+ is_supported_version = packaging .version .Version (pandas .__version__ ) >= packaging .version .Version ("1.5.0" )
30+
31+ @pytest .mark .skipif (not is_supported_version , reason = "requires Pandas 1.5.0 and above" )
32+ def test_constructor_from_sequence ():
33+ json_obj = [0 , "str" , {"a" : 0 , "b" : 1 }]
34+ data = db_dtypes .JSONArray ._from_sequence (json_obj )
You can’t perform that action at this time.
0 commit comments