@@ -195,7 +195,7 @@ def test_read_gbq_raises_invalid_column_order(self, project_id):
195
195
col_order = ["string_aaa" , "string_1" , "string_2" ]
196
196
197
197
# Column string_aaa does not exist. Should raise InvalidColumnOrder
198
- with pytest .raises (gbq .InvalidColumnOrder ):
198
+ with pytest .raises (exceptions .InvalidColumnOrder ):
199
199
gbq .read_gbq (
200
200
query ,
201
201
project_id = project_id ,
@@ -227,7 +227,7 @@ def test_read_gbq_raises_invalid_index_column(self, project_id):
227
227
col_order = ["string_3" , "string_2" ]
228
228
229
229
# Column string_bbb does not exist. Should raise InvalidIndexColumn
230
- with pytest .raises (gbq .InvalidIndexColumn ):
230
+ with pytest .raises (exceptions .InvalidIndexColumn ):
231
231
gbq .read_gbq (
232
232
query ,
233
233
project_id = project_id ,
@@ -507,7 +507,7 @@ def test_timeout_configuration(self, project_id):
507
507
]
508
508
509
509
for config in configs :
510
- with pytest .raises (gbq .QueryTimeout ):
510
+ with pytest .raises (exceptions .QueryTimeout ):
511
511
gbq .read_gbq (
512
512
sql_statement ,
513
513
project_id = project_id ,
@@ -741,7 +741,7 @@ def test_upload_data_if_table_exists_fail(self, project_id):
741
741
)
742
742
743
743
# Test the default value of if_exists == 'fail'
744
- with pytest .raises (gbq .TableCreationError ):
744
+ with pytest .raises (exceptions .TableCreationError ):
745
745
gbq .to_gbq (
746
746
df ,
747
747
self .destination_table + test_id ,
@@ -750,7 +750,7 @@ def test_upload_data_if_table_exists_fail(self, project_id):
750
750
)
751
751
752
752
# Test the if_exists parameter with value 'fail'
753
- with pytest .raises (gbq .TableCreationError ):
753
+ with pytest .raises (exceptions .TableCreationError ):
754
754
gbq .to_gbq (
755
755
df ,
756
756
self .destination_table + test_id ,
@@ -1193,7 +1193,7 @@ def test_create_dataset(bigquery_client, gbq_dataset, random_dataset_id, project
1193
1193
1194
1194
def test_create_dataset_already_exists (gbq_dataset , random_dataset_id ):
1195
1195
gbq_dataset .create (random_dataset_id )
1196
- with pytest .raises (gbq .DatasetCreationError ):
1196
+ with pytest .raises (exceptions .DatasetCreationError ):
1197
1197
gbq_dataset .create (random_dataset_id )
1198
1198
1199
1199
@@ -1218,7 +1218,7 @@ def test_create_table(gbq_table):
1218
1218
def test_create_table_already_exists (gbq_table ):
1219
1219
schema = gbq ._generate_bq_schema (make_mixed_dataframe_v1 ())
1220
1220
gbq_table .create ("test_create_table_exists" , schema )
1221
- with pytest .raises (gbq .TableCreationError ):
1221
+ with pytest .raises (exceptions .TableCreationError ):
1222
1222
gbq_table .create ("test_create_table_exists" , schema )
1223
1223
1224
1224
0 commit comments