Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
chalmerlowe committed Aug 8, 2023
1 parent b60ce30 commit b009a68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
3 changes: 1 addition & 2 deletions tests/system/test_gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ def test_upload_data_with_timestamp(self, project_id):
"2018-07-13T05:40:45.348318",
"2018-08-13T05:40:45.348318",
],
dtype="datetime64[us]",
dtype="datetime64[ns]",
).dt.tz_localize("UTC")

gbq.to_gbq(
Expand All @@ -1027,7 +1027,6 @@ def test_upload_data_with_timestamp(self, project_id):
result_df = gbq.read_gbq(
"SELECT * FROM {0}".format(self.destination_table + test_id),
project_id=project_id,
dtypes={"times": "datetime64[us]"},
credentials=self.credentials,
dialect="legacy",
)
Expand Down
15 changes: 6 additions & 9 deletions tests/system/test_read_gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def writable_table(
"2011-10-01 00:01:02.345678",
"2018-04-11 23:59:59.999999",
],
dtype="datetime64[us]",
dtype="datetime64[ns]",
),
"float_col": [1.125, -2.375, 0.0],
"int64_col": pandas.Series(
Expand All @@ -175,7 +175,7 @@ def writable_table(
"2011-10-01 00:01:02.345678",
"2018-04-11 23:59:59.999999",
],
dtype="datetime64[us]",
dtype="datetime64[ns]",
).dt.tz_localize(datetime.timezone.utc),
}
),
Expand Down Expand Up @@ -283,7 +283,7 @@ def writable_table(
"2011-10-01 00:01:02.345678",
None,
],
dtype="datetime64[us]",
dtype="datetime64[ns]",
),
"float_col": [None, -2.375, 0.0],
"int64_col": pandas.Series([-1, None, 0], dtype="Int64"),
Expand All @@ -303,7 +303,7 @@ def writable_table(
None,
"2018-04-11 23:59:59.999999",
],
dtype="datetime64[us]",
dtype="datetime64[ns]",
).dt.tz_localize(datetime.timezone.utc),
}
),
Expand Down Expand Up @@ -383,7 +383,7 @@ def writable_table(
),
"datetime_col": pandas.Series(
[None],
dtype="datetime64[us]",
dtype="datetime64[ns]",
),
"float_col": pandas.Series([None], dtype="float64"),
"int64_col": pandas.Series([None], dtype="Int64"),
Expand All @@ -395,7 +395,7 @@ def writable_table(
),
"timestamp_col": pandas.Series(
[None],
dtype="datetime64[us]",
dtype="datetime64[ns]",
).dt.tz_localize(datetime.timezone.utc),
}
),
Expand Down Expand Up @@ -552,9 +552,6 @@ def test_default_dtypes(
result = read_gbq(
query,
use_bqstorage_api=use_bqstorage_api,
dtypes={"datetime_col": "datetime64[us]",
"timestamp_col": "datetime64[us, UTC]",
},
configuration={"query": {"useQueryCache": False}},
)
pandas.testing.assert_frame_equal(result, expected)
Expand Down

0 comments on commit b009a68

Please sign in to comment.