Skip to content

TST: add mocked job_id for google-cloud-bigquery 0.29 #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 25, 2018
Merged
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ install:
# https://github.com/pre-commit/pre-commit/commit/e3ab8902692e896da9ded42bd4d76ea4e1de359d
- pyenv install -s $PYENV_VERSION
- pyenv global system $PYENV_VERSION
# Upgrade setuptools and pip to work around
# https://github.com/pypa/setuptools/issues/885
- pip install --upgrade setuptools
- pip install --upgrade pip
- REQ="ci/requirements-${PYTHON}-${PANDAS}" ;
if [ -f "$REQ.pip" ]; then
pip install --upgrade nox-automation ;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
wget http://repo.continuum.io/miniconda/Miniconda3-4.3.30-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda ;
export PATH="$HOME/miniconda/bin:$PATH" ;
hash -r ;
Expand All @@ -32,8 +36,8 @@ install:
conda info -a ;
conda create -q -n test-environment python=$PYTHON ;
source activate test-environment ;
conda install -q setuptools ;
conda install -q pandas=$PANDAS;
pip install coverage pytest pytest-cov flake8 codecov ;
conda install -q --file "$REQ.conda";
conda list ;
python setup.py install ;
Expand All @@ -45,7 +49,6 @@ script:
- if [[ $PYTHON == '3.6' ]] && [[ "$PANDAS" == "MASTER" ]]; then nox -s test36master ; fi
- REQ="ci/requirements-${PYTHON}-${PANDAS}" ;
if [ -f "$REQ.conda" ]; then
pip install pytest ;
pytest -v tests ;
fi
- if [[ $COVERAGE == 'true' ]]; then nox -s cover ; fi
Expand Down
7 changes: 6 additions & 1 deletion ci/requirements-3.6-0.20.1.conda
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
google-auth
google-auth-oauthlib
google-cloud-bigquery
google-cloud-bigquery==0.32.0
pytest
pytest-cov
codecov
coverage
flake8
1 change: 1 addition & 0 deletions tests/unit/test_gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def mock_bigquery_client(monkeypatch):
mock_client = mock.create_autospec(google.cloud.bigquery.Client)
# Mock out SELECT 1 query results.
mock_query = mock.create_autospec(google.cloud.bigquery.QueryJob)
mock_query.job_id = 'some-random-id'
mock_query.state = 'DONE'
mock_rows = mock.create_autospec(
google.cloud.bigquery.table.RowIterator)
Expand Down