@@ -174,7 +174,7 @@ def make_mixed_dataframe_v2(test_size):
174
174
175
175
def test_generate_bq_schema_deprecated ():
176
176
# 11121 Deprecation of generate_bq_schema
177
- with tm . assert_produces_warning (FutureWarning ):
177
+ with pytest . warns (FutureWarning ):
178
178
df = make_mixed_dataframe_v2 (10 )
179
179
gbq .generate_bq_schema (df )
180
180
@@ -1447,7 +1447,7 @@ def test_upload_data_with_invalid_user_schema_raises_error(self):
1447
1447
{'name' : 'C' , 'type' : 'FLOAT' },
1448
1448
{'name' : 'D' , 'type' : 'FLOAT' }]
1449
1449
destination_table = self .destination_table + test_id
1450
- with tm . assertRaises (gbq .GenericGBQException ):
1450
+ with pytest . raises (gbq .GenericGBQException ):
1451
1451
gbq .to_gbq (df , destination_table , _get_project_id (),
1452
1452
private_key = _get_private_key_path (),
1453
1453
table_schema = test_schema )
@@ -1459,7 +1459,7 @@ def test_upload_data_with_missing_schema_fields_raises_error(self):
1459
1459
{'name' : 'B' , 'type' : 'FLOAT' },
1460
1460
{'name' : 'C' , 'type' : 'FLOAT' }]
1461
1461
destination_table = self .destination_table + test_id
1462
- with tm . assertRaises (gbq .GenericGBQException ):
1462
+ with pytest . raises (gbq .GenericGBQException ):
1463
1463
gbq .to_gbq (df , destination_table , _get_project_id (),
1464
1464
private_key = _get_private_key_path (),
1465
1465
table_schema = test_schema )
0 commit comments