When run "tox -e py27" to do unit test, there are error messages of import as below.
Add "testresources>=0.2.4 # Apache-2.0/BSD" into test-requirements.txt to fix this issue.
stack@openstack-n3:~/networking-bgpvpn$ tox -e py27
py27 create: /home/stack/networking-bgpvpn/.tox/py27
py27 installdeps: -r/home/stack/networking-bgpvpn/requirements.txt, -r/home/stack/networking-bgpvpn/test-requirements.txt
py27 develop-inst: /home/stack/networking-bgpvpn
py27 installed: alembic==0.8.6,amqp==1.4.9,anyjson==0.3.3,appdirs==1.4.0,astroid==1.3.8,Babel==2.3.4,beautifulsoup4==4.4.1,blockdiag==1.5.3,cachetools==1.1.6,cliff==2.1.0,cmd2==0.6.8,contextlib2==0.5.3,coverage==4.1,debtcollector==1.5.0,decorator==4.0.10,discover==0.4.0,Django==1.8.13,django-appconf==1.0.2,django-babel==0.5.1,django-compressor==2.0,django-nose==1.4.4,django-openstack-auth==2.3.0,django-pyscss==2.0.2,docutils==0.12,dogpile.cache==0.6.1,enum34==1.1.6,eventlet==0.19.0,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,flake8==2.2.4,funcparserlib==0.3.6,funcsigs==1.0.2,functools32==3.2.3.post2,futures==3.0.5,futurist==0.14.0,greenlet==0.4.10,hacking==0.10.2,-e git+https://git.openstack.org/openstack/horizon@077d38682d6a1fbeb5d70bbe062340a8fca7a731#egg=horizon,httplib2==0.9.2,iso8601==0.1.11,Jinja2==2.8,jsonpatch==1.14,jsonpointer==1.10,jsonschema==2.5.1,keystoneauth1==2.8.0,keystonemiddleware==4.5.1,kombu==3.0.35,linecache2==1.0.0,logilab-common==1.2.2,logutils==0.3.3,Mako==1.0.4,MarkupSafe==0.23,mccabe==0.2.1,mock==2.0.0,monotonic==1.1,mox3==0.16.0,msgpack-python==0.4.7,netaddr==0.7.18,netifaces==0.10.4,-e git+https://git.openstack.org/openstack/networking-bagpipe@54c5149a8d11b649bfcfc3b259376683ce9501d4#egg=networking_bagpipe,-e git+https://github.com/openstack/networking-bgpvpn.git@c93da24ec404c2233755fac4e482dc2b1e6485e4#egg=networking_bgpvpn,-e git+https://git.openstack.org/openstack/networking-odl@6810043dfe85018e7d3c616775da601169adf01a#egg=networking_odl,-e git+https://git.openstack.org/openstack/neutron@8d6c6ccc14e2a6915a73d530d03ca9d5ba26b336#egg=neutron,neutron-lib==0.2.0,nose==1.3.7,openstacksdk==0.8.6,os-client-config==1.18.0,oslo.cache==1.10.0,oslo.concurrency==3.11.0,oslo.config==3.12.0,oslo.context==2.5.0,oslo.db==4.7.0,oslo.i18n==3.7.0,oslo.log==3.11.0,oslo.messaging==5.5.0,oslo.middleware==3.14.0,oslo.policy==1.11.0,oslo.reports==1.11.0,oslo.rootwrap==4.3.0,oslo.serialization==2.10.0,oslo.service==1.12.0,oslo.utils==3.14.0,oslo.versionedobjects==1.12.0,oslosphinx==4.5.0,oslotest==2.6.0,osprofiler==1.3.0,ovs==2.5.0,Paste==2.0.3,PasteDeploy==1.5.2,pathlib==1.0.1,pbr==1.10.0,pecan==1.1.2,pep8==1.5.7,pika==0.10.0,pika-pool==0.1.3,Pillow==3.2.0,Pint==0.7.2,positional==1.1.1,prettytable==0.7.2,psutil==1.2.1,pycadf==2.3.0,pyflakes==0.8.1,Pygments==2.1.3,pyinotify==0.9.6,pylint==1.4.5,pyparsing==2.1.5,pyScss==1.3.4,python-ceilometerclient==2.4.0,python-cinderclient==1.8.0,python-dateutil==2.5.3,python-designateclient==2.1.0,python-editor==1.0.1,python-glanceclient==2.1.0,python-heatclient==1.2.0,python-keystoneclient==3.1.0,python-mimeparse==1.5.2,python-neutronclient==4.2.0,python-novaclient==4.1.0,python-openstackclient==2.6.0,python-subunit==1.2.0,python-swiftclient==3.0.0,pytz==2016.4,PyYAML==3.11,rcssmin==1.0.6,reno==1.8.0,repoze.lru==0.6,requests==2.10.0,requestsexceptions==1.1.3,retrying==1.3.3,rfc3986==0.3.1,rjsmin==1.0.12,Routes==2.3.1,ryu==4.4,seqdiag==0.9.5,simplejson==3.8.2,singledispatch==3.4.0.3,six==1.10.0,Sphinx==1.2.3,sphinxcontrib-blockdiag==1.5.5,sphinxcontrib-seqdiag==0.8.5,SQLAlchemy==1.0.13,sqlalchemy-migrate==0.10.0,sqlparse==0.1.19,stevedore==1.15.0,Tempita==0.5.2,testrepository==0.0.20,testscenarios==0.5.0,testtools==2.2.0,traceback2==1.4.0,unicodecsv==0.14.1,unittest2==1.1.0,waitress==0.9.0,warlock==1.2.0,webcolors==1.5,WebOb==1.6.1,WebTest==2.0.21,wrapt==1.10.8,XStatic==1.0.1,XStatic-Angular==1.3.18.1,XStatic-Angular-Bootstrap==0.11.0.7,XStatic-Angular-FileUpload==12.0.4.0,XStatic-Angular-Gettext==2.1.0.2,XStatic-Angular-lrdragndrop==1.0.2.2,XStatic-Bootstrap-Datepicker==1.3.1.0,XStatic-Bootstrap-SCSS==3.3.6.0,XStatic-bootswatch==3.3.6.0,XStatic-D3==3.1.6.2,XStatic-Font-Awesome==4.5.0.0,XStatic-Hogan==2.0.0.2,XStatic-Jasmine==2.4.1.1,XStatic-jQuery==1.10.2.1,XStatic-JQuery-Migrate==1.2.1.1,XStatic-jquery-ui==1.11.0.1,XStatic-JQuery.quicksearch==2.0.3.1,XStatic-JQuery.TableSorter==2.14.5.1,XStatic-JSEncrypt==2.0.0.2,XStatic-mdi==1.4.57.0,XStatic-Rickshaw==1.5.0.0,XStatic-roboto-fontface==0.4.3.2,XStatic-smart-table==1.4.5.3,XStatic-Spin==1.2.5.2,XStatic-term.js==0.0.7.0
py27 runtests: PYTHONHASHSEED='3676395783'
py27 runtests: commands[0] | python setup.py testr --slowest --testr-args=
running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking_bgpvpn/tests/unit} --list
--- import errors ---
Failed to import test module: networking_bgpvpn.tests.unit.client.test_client
Traceback (most recent call last):
File "/home/stack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/home/stack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "networking_bgpvpn/tests/unit/client/test_client.py", line 18, in <module>
from neutron.tests.unit.extensions import base as test_extensions_base
File "/home/stack/networking-bgpvpn/.tox/py27/src/neutron/neutron/tests/unit/extensions/base.py", line 30, in <module>
from neutron.tests.unit.api import test_extensions
File "/home/stack/networking-bgpvpn/.tox/py27/src/neutron/neutron/tests/unit/api/test_extensions.py", line 38, in <module>
from neutron.tests.unit.api.v2 import test_base
File "/home/stack/networking-bgpvpn/.tox/py27/src/neutron/neutron/tests/unit/api/v2/test_base.py", line 46, in <module>
from neutron.tests.unit import testlib_api
File "/home/stack/networking-bgpvpn/.tox/py27/src/neutron/neutron/tests/unit/testlib_api.py", line 18, in <module>
import testresources
ImportError: No module named testresources
Fix proposed to branch: master /review. openstack. org/337541
Review: https:/