Skip to content

Commit

Permalink
CI/BUG: Skip bigquery tests where no creds are found
Browse files Browse the repository at this point in the history
Author: Phillip Cloud <cpcloud@gmail.com>

Closes ibis-project#1468 from cpcloud/fix-bq-creds and squashes the following commits:

ce6929b [Phillip Cloud] CI/BUG: Skip bigquery tests where no creds are found
  • Loading branch information
cpcloud committed Jun 4, 2018
1 parent 1c47447 commit 9722a54
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions ibis/bigquery/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,15 @@ def test_parted_column(client, kind, option, expected_fn):


def test_cross_project_query():
con = ibis.bigquery.connect(
project_id='ibis-gbq',
dataset_id='bigquery-public-data.stackoverflow')
ga = pytest.importorskip('google.auth')

try:
con = ibis.bigquery.connect(
project_id='ibis-gbq',
dataset_id='bigquery-public-data.stackoverflow')
except ga.exceptions.DefaultCredentialsError:
pytest.skip("no credentials found, skipping")

table = con.table('posts_questions')
expr = table[table.tags.contains('ibis')][['title', 'tags']]
result = expr.compile()
Expand Down Expand Up @@ -455,8 +461,14 @@ def test_exists_database_different_project(client, name, expected):


def test_repeated_project_name():
con = ibis.bigquery.connect(
project_id='ibis-gbq', dataset_id='ibis-gbq.testing')
ga = pytest.importorskip('google.auth')

try:
con = ibis.bigquery.connect(
project_id='ibis-gbq', dataset_id='ibis-gbq.testing')
except ga.exceptions.DefaultCredentialsError:
pytest.skip("no credentials found, skipping")

assert 'functional_alltypes' in con.list_tables()


Expand Down

0 comments on commit 9722a54

Please sign in to comment.