Skip to content

Commit 8cdaad3

Browse files
committed
fix test failures
1 parent c03ebde commit 8cdaad3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/system/test_gbq.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import pytest
1717
import pytz
1818

19-
from pandas_gbq import gbq
19+
from pandas_gbq import exceptions, gbq
2020
import pandas_gbq.schema
2121

2222
TABLE_ID = "new_test"
@@ -238,7 +238,7 @@ def test_read_gbq_raises_invalid_index_column(self, project_id):
238238
)
239239

240240
def test_malformed_query(self, project_id):
241-
with pytest.raises(gbq.GenericGBQException):
241+
with pytest.raises(exceptions.GenericGBQException):
242242
gbq.read_gbq(
243243
"SELCET * FORM [publicdata:samples.shakespeare]",
244244
project_id=project_id,
@@ -247,7 +247,7 @@ def test_malformed_query(self, project_id):
247247
)
248248

249249
def test_bad_project_id(self):
250-
with pytest.raises(gbq.GenericGBQException):
250+
with pytest.raises(exceptions.GenericGBQException):
251251
gbq.read_gbq(
252252
"SELCET * FROM [publicdata:samples.shakespeare]",
253253
project_id="not-my-project",
@@ -256,7 +256,7 @@ def test_bad_project_id(self):
256256
)
257257

258258
def test_bad_table_name(self, project_id):
259-
with pytest.raises(gbq.GenericGBQException):
259+
with pytest.raises(exceptions.GenericGBQException):
260260
gbq.read_gbq(
261261
"SELECT * FROM [publicdata:samples.nope]",
262262
project_id=project_id,
@@ -316,7 +316,7 @@ def test_legacy_sql(self, project_id):
316316

317317
# Test that a legacy sql statement fails when
318318
# setting dialect='standard'
319-
with pytest.raises(gbq.GenericGBQException):
319+
with pytest.raises(exceptions.GenericGBQException):
320320
gbq.read_gbq(
321321
legacy_sql,
322322
project_id=project_id,
@@ -341,7 +341,7 @@ def test_standard_sql(self, project_id):
341341

342342
# Test that a standard sql statement fails when using
343343
# the legacy SQL dialect.
344-
with pytest.raises(gbq.GenericGBQException):
344+
with pytest.raises(exceptions.GenericGBQException):
345345
gbq.read_gbq(
346346
standard_sql,
347347
project_id=project_id,
@@ -1029,7 +1029,7 @@ def test_upload_data_with_invalid_user_schema_raises_error(self, project_id):
10291029
{"name": "D", "type": "FLOAT"},
10301030
]
10311031
destination_table = self.destination_table + test_id
1032-
with pytest.raises(gbq.GenericGBQException):
1032+
with pytest.raises(exceptions.GenericGBQException):
10331033
gbq.to_gbq(
10341034
df,
10351035
destination_table,
@@ -1047,7 +1047,7 @@ def test_upload_data_with_missing_schema_fields_raises_error(self, project_id):
10471047
{"name": "C", "type": "FLOAT"},
10481048
]
10491049
destination_table = self.destination_table + test_id
1050-
with pytest.raises(gbq.GenericGBQException):
1050+
with pytest.raises(exceptions.GenericGBQException):
10511051
gbq.to_gbq(
10521052
df,
10531053
destination_table,

0 commit comments

Comments
 (0)