GeezerVison is showing github.com — Import error in trace unit tests · Issue #3743 · googleapis/google-cloud-python
Import error in trace unit tests #3743
Description
It looks like trace/ needs to be updated to match changes elsewhere. Also, trace/nox.py seems to be missing some recent changes made to the other nox.py files.
To reproduce:
$ docker run -it --entrypoint=/bin/bash gcr.io/google-appengine/python:latest
$ git clone --depth 1 https://github.com/GoogleCloudPlatform/google-cloud-python.git
$ pip install --upgrade nox-automation
$ cd /app/google-cloud-python
$ nox -f trace/nox.py -e "unit_tests(python_version='3.4')"
Output:
nox > Running session unit_tests(python_version='3.4')
nox > virtualenv /home/vmagent/app/google-cloud-python/.nox/unit_tests-python_version-3-4 -p python3.4
nox > chdir /home/vmagent/app/google-cloud-python/trace
nox > pip install --upgrade mock pytest pytest-cov ../core/
nox > pip install --upgrade -e .
nox > py.test --quiet --cov=google.cloud.trace --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=97 tests/
Coverage.py warning: Module google.cloud.trace was never imported. (module-not-imported)
Required test coverage of 97% reached. Total coverage: 100.00%
========================================================================= ERRORS ==========================================================================
_____________________________________________________ ERROR collecting trace/tests/unit/test__gax.py ______________________________________________________
ImportError while importing test module '/home/vmagent/app/google-cloud-python/trace/tests/unit/test__gax.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/unit/test__gax.py:19: in <module>
from google.cloud._testing import _GAXBaseAPI
E ImportError: No module named 'google.cloud._testing'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1 error in 0.82 seconds
nox > Command py.test --quiet --cov=google.cloud.trace --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=97 tests/ failed with exit code 2
nox > Session unit_tests(python_version='3.4') failed. :(
Activity
lukesneeringer commented on Aug 7, 2017
Is this the manual code or the autogen, Doug?
liyanhui1228 commented on Aug 7, 2017
It's the manual code for unit test, I'm fixing it.
lukesneeringer commented on Aug 7, 2017
liyanhui1228 commented on Aug 7, 2017
Fixed via #3749 , closing now.
Metadata
Metadata
Development
No branches or pull requestsIssue actions