Skip to content

Commit

Permalink
Merge remote-tracking branch 'ibis-project/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed May 16, 2018
2 parents 82b9d6b + d3c44dc commit 71110e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 10 additions & 0 deletions ibis/bigquery/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ def client():
pytest.skip("no credentials found, skipping")


@pytest.fixture(scope='session')
def client2():
ga = pytest.importorskip('google.auth')

try:
return ibis.bigquery.connect(PROJECT_ID, DATASET_ID)
except ga.exceptions.DefaultCredentialsError:
pytest.skip("no credentials found, skipping")


@pytest.fixture(scope='session')
def alltypes(client):
return client.table('functional_alltypes')
Expand Down
7 changes: 3 additions & 4 deletions ibis/bigquery/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,9 @@ def test_cross_project_query():
assert df.tags.dtype == np.object


def test_set_database():
con = ibis.bigquery.connect(project_id='ibis-gbq', dataset_id='testing')
con.set_database('bigquery-public-data.epa_historical_air_quality')
tables = con.list_tables()
def test_set_database(client2):
client2.set_database('bigquery-public-data.epa_historical_air_quality')
tables = client2.list_tables()
assert 'co_daily_summary' in tables


Expand Down

0 comments on commit 71110e6

Please sign in to comment.