Skip to content

Commit d4fb0bb

Browse files
authored
Run tests locally setting env var (#10)
1 parent fcbf78c commit d4fb0bb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ ddf = dask_bigquery.read_gbq(
2222
ddf.head()
2323
```
2424

25+
## Run tests locally
26+
27+
To run the tests locally you need to be authenticated and have a project created on that account. If you're using a service account, when created you need to select the role of "BigQuery Admin" in the section "Grant this service account access to project".
28+
29+
You can run the tests by doing:
30+
31+
`$ DASK_BIGQUERY_PROJECT_ID=<your_project_id> pytest dask_bigquery`
32+
2533
## History
2634

2735
This project stems from the discussion in

dask_bigquery/tests/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def df():
2828

2929
@pytest.fixture
3030
def dataset(df):
31-
project_id = os.environ.get("DASK_BIGQUERY_PROJECT_ID", "dask-bigquery")
31+
project_id = os.environ.get("DASK_BIGQUERY_PROJECT_ID")
3232
dataset_id = uuid.uuid4().hex
3333
table_id = "table_test"
3434
# push data to gbq

0 commit comments

Comments
 (0)