Skip to content

Commit f4ecffb

Browse files
committed
Put expectation on correct to_gbq call
1 parent 59a9dcd commit f4ecffb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pandas/tests/io/test_gbq.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -210,22 +210,22 @@ def test_gbq_if_exists(
210210
test_size = 200
211211
df = make_mixed_dataframe_v2(test_size)
212212

213+
df.to_gbq(
214+
destination_table,
215+
_get_project_id(),
216+
chunksize=None,
217+
credentials=_get_credentials(),
218+
)
219+
213220
with expectation:
214-
df.to_gbq(
221+
df.iloc[:100].to_gbq(
215222
destination_table,
216223
_get_project_id(),
224+
if_exists=if_exists,
217225
chunksize=None,
218226
credentials=_get_credentials(),
219227
)
220228

221-
df.iloc[:100].to_gbq(
222-
destination_table,
223-
_get_project_id(),
224-
if_exists=if_exists,
225-
chunksize=None,
226-
credentials=_get_credentials(),
227-
)
228-
229229
result = pd.read_gbq(
230230
f"SELECT COUNT(*) AS num_rows FROM {destination_table}",
231231
project_id=_get_project_id(),

0 commit comments

Comments
 (0)