@@ -65,7 +65,7 @@ def test_load_table_from_dataframe_w_automatic_schema(bigquery_client, dataset_i
65
65
).dt .tz_localize (datetime .timezone .utc ),
66
66
),
67
67
(
68
- "dt_col " ,
68
+ "dt_col_no_tz " ,
69
69
pandas .Series (
70
70
[
71
71
datetime .datetime (2010 , 1 , 2 , 3 , 44 , 50 ),
@@ -130,7 +130,7 @@ def test_load_table_from_dataframe_w_automatic_schema(bigquery_client, dataset_i
130
130
),
131
131
),
132
132
(
133
- "array_dt_col " ,
133
+ "array_dt_col_no_tz " ,
134
134
pandas .Series (
135
135
[
136
136
[datetime .datetime (2010 , 1 , 2 , 3 , 44 , 50 )],
@@ -196,9 +196,7 @@ def test_load_table_from_dataframe_w_automatic_schema(bigquery_client, dataset_i
196
196
assert tuple (table .schema ) == (
197
197
bigquery .SchemaField ("bool_col" , "BOOLEAN" ),
198
198
bigquery .SchemaField ("ts_col" , "TIMESTAMP" ),
199
- # TODO: Update to DATETIME in V3
200
- # https://github.com/googleapis/python-bigquery/issues/985
201
- bigquery .SchemaField ("dt_col" , "TIMESTAMP" ),
199
+ bigquery .SchemaField ("dt_col_no_tz" , "DATETIME" ),
202
200
bigquery .SchemaField ("float32_col" , "FLOAT" ),
203
201
bigquery .SchemaField ("float64_col" , "FLOAT" ),
204
202
bigquery .SchemaField ("int8_col" , "INTEGER" ),
@@ -212,9 +210,7 @@ def test_load_table_from_dataframe_w_automatic_schema(bigquery_client, dataset_i
212
210
bigquery .SchemaField ("time_col" , "TIME" ),
213
211
bigquery .SchemaField ("array_bool_col" , "BOOLEAN" , mode = "REPEATED" ),
214
212
bigquery .SchemaField ("array_ts_col" , "TIMESTAMP" , mode = "REPEATED" ),
215
- # TODO: Update to DATETIME in V3
216
- # https://github.com/googleapis/python-bigquery/issues/985
217
- bigquery .SchemaField ("array_dt_col" , "TIMESTAMP" , mode = "REPEATED" ),
213
+ bigquery .SchemaField ("array_dt_col_no_tz" , "DATETIME" , mode = "REPEATED" ),
218
214
bigquery .SchemaField ("array_float32_col" , "FLOAT" , mode = "REPEATED" ),
219
215
bigquery .SchemaField ("array_float64_col" , "FLOAT" , mode = "REPEATED" ),
220
216
bigquery .SchemaField ("array_int8_col" , "INTEGER" , mode = "REPEATED" ),
@@ -225,6 +221,7 @@ def test_load_table_from_dataframe_w_automatic_schema(bigquery_client, dataset_i
225
221
bigquery .SchemaField ("array_uint16_col" , "INTEGER" , mode = "REPEATED" ),
226
222
bigquery .SchemaField ("array_uint32_col" , "INTEGER" , mode = "REPEATED" ),
227
223
)
224
+
228
225
assert numpy .array (
229
226
sorted (map (list , bigquery_client .list_rows (table )), key = lambda r : r [5 ]),
230
227
dtype = "object" ,
@@ -237,13 +234,11 @@ def test_load_table_from_dataframe_w_automatic_schema(bigquery_client, dataset_i
237
234
datetime .datetime (2011 , 2 , 3 , 14 , 50 , 59 , tzinfo = datetime .timezone .utc ),
238
235
datetime .datetime (2012 , 3 , 14 , 15 , 16 , tzinfo = datetime .timezone .utc ),
239
236
],
240
- # dt_col
241
- # TODO: Remove tzinfo in V3.
242
- # https://github.com/googleapis/python-bigquery/issues/985
237
+ # dt_col_no_tz
243
238
[
244
- datetime .datetime (2010 , 1 , 2 , 3 , 44 , 50 , tzinfo = datetime . timezone . utc ),
245
- datetime .datetime (2011 , 2 , 3 , 14 , 50 , 59 , tzinfo = datetime . timezone . utc ),
246
- datetime .datetime (2012 , 3 , 14 , 15 , 16 , tzinfo = datetime . timezone . utc ),
239
+ datetime .datetime (2010 , 1 , 2 , 3 , 44 , 50 ),
240
+ datetime .datetime (2011 , 2 , 3 , 14 , 50 , 59 ),
241
+ datetime .datetime (2012 , 3 , 14 , 15 , 16 ),
247
242
],
248
243
# float32_col
249
244
[1.0 , 2.0 , 3.0 ],
@@ -280,12 +275,10 @@ def test_load_table_from_dataframe_w_automatic_schema(bigquery_client, dataset_i
280
275
[datetime .datetime (2012 , 3 , 14 , 15 , 16 , tzinfo = datetime .timezone .utc )],
281
276
],
282
277
# array_dt_col
283
- # TODO: Remove tzinfo in V3.
284
- # https://github.com/googleapis/python-bigquery/issues/985
285
278
[
286
- [datetime .datetime (2010 , 1 , 2 , 3 , 44 , 50 , tzinfo = datetime . timezone . utc )],
287
- [datetime .datetime (2011 , 2 , 3 , 14 , 50 , 59 , tzinfo = datetime . timezone . utc )],
288
- [datetime .datetime (2012 , 3 , 14 , 15 , 16 , tzinfo = datetime . timezone . utc )],
279
+ [datetime .datetime (2010 , 1 , 2 , 3 , 44 , 50 )],
280
+ [datetime .datetime (2011 , 2 , 3 , 14 , 50 , 59 )],
281
+ [datetime .datetime (2012 , 3 , 14 , 15 , 16 )],
289
282
],
290
283
# array_float32_col
291
284
[[1.0 ], [2.0 ], [3.0 ]],
0 commit comments