diff --git a/.travis.yml b/.travis.yml index 91287092..b30f79aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 ; @@ -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 ; @@ -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 diff --git a/ci/requirements-3.6-0.20.1.conda b/ci/requirements-3.6-0.20.1.conda index e51ca487..a057399d 100644 --- a/ci/requirements-3.6-0.20.1.conda +++ b/ci/requirements-3.6-0.20.1.conda @@ -1,3 +1,8 @@ google-auth google-auth-oauthlib -google-cloud-bigquery +google-cloud-bigquery==0.32.0 +pytest +pytest-cov +codecov +coverage +flake8 diff --git a/tests/unit/test_gbq.py b/tests/unit/test_gbq.py index b7febafd..ae1d35c1 100644 --- a/tests/unit/test_gbq.py +++ b/tests/unit/test_gbq.py @@ -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)