openstackclient如何用tox对单个实例进行测试

提问于 2015-07-09 02:23:41 -0500

chengkunye 图像

updated 2015-07-09 02:27:54 -0500

系统环境ubuntu14.04

本地用的时devstack部署的openstack环境

openstackclient版本openstack 1.5.1

当执行tox -epy27命令时能够完成所有的test代码测试,当尝试测试单个实例时出现错误 命令如下:

tox -epy27 openstackclient.tests.api.test_api.TestKeystoneSession.test_session_request

报如下错误:

    py27 develop-inst-nodeps: /opt/stack/python-openstackclient
py27 installed: -f file:///opt/stack/.wheelhouse,appdirs==1.4.0,Babel==1.3,cffi==1.1.2,cliff==1.13.0,cliff-tablib==1.1,cmd2==0.6.8,coverage==3.7.1,cryptography==0.9.2,debtcollector==0.5.0,discover==0.4.0,docutils==0.12,ecdsa==0.13,enum34==1.0.4,extras==0.0.3,fixtures==1.3.1,flake8==2.2.4,functools32==3.2.3.post1,hacking==0.10.2,httplib2==0.9.1,idna==2.0,ipaddress==1.0.7,iso8601==0.1.10,Jinja2==2.7.3,jsonpatch==1.11,jsonpointer==1.9,jsonschema==2.5.1,linecache2==1.0.0,MarkupSafe==0.23,mccabe==0.2.1,mock==1.0.1,mox3==0.8.0,msgpack-python==0.4.6,netaddr==0.7.15,netifaces==0.10.4,os-client-config==1.4.0,os-testr==0.2.0,oslo.config==1.14.0,oslo.context==0.4.0,oslo.i18n==2.1.0,oslo.log==1.6.0,oslo.serialization==1.7.0,oslo.utils==1.8.0,oslosphinx==3.0.0,oslotest==1.8.0,paramiko==1.15.2,pbr==1.2.0,pep8==1.5.7,prettytable==0.7.2,pyasn1==0.1.8,pycparser==2.14,pycrypto==2.6.1,pyflakes==0.8.1,Pygments==2.0.2,pyOpenSSL==0.15.1,pyparsing==2.0.3,python-cinderclient==1.3.1,python-glanceclient==0.19.0,python-keystoneclient==1.6.0,python-mimeparse==0.1.4,python-neutronclient==2.6.0,python-novaclient==2.26.0,-e git://git.openstack.org/openstack/python-openstackclient.git@f89fc1ef3288fb432fe6f76268a92f6f1111a1eb#egg=python_openstackclient-dev,python-subunit==1.1.0,pytz==2015.4,PyYAML==3.11,requests==2.7.0,requests-mock==0.6.0,simplejson==3.7.3,six==1.9.0,Sphinx==1.2.3,stevedore==1.6.0,tablib==0.10.0,tempest-lib==0.6.1,testrepository==0.0.20,testscenarios==0.5.0,testtools==1.8.0,traceback2==1.4.0,unittest2==1.1.0,warlock==1.1.0,WebOb==1.4.1,wheel==0.24.0,wrapt==1.10.5
py27 runtests: PYTHONHASHSEED='589123378'
py27 runtests: commands[0] | ostestr openstackclient.tests.api.test_api.TestKeystoneSession.test_session_request
usage: ostestr [-h] [--blacklist_file BLACKLIST_FILE] [--regex REGEX]
               [--pretty] [--no-pretty] [--subunit] [--list]
               [--no-discover TEST_ID] [--slowest] [--no-slowest]
               [--pdb TEST_ID] [--parallel] [--serial] [--concurrency WORKERS]
               [--until-failure] [--print-exclude]
ostestr: error: unrecognized arguments: openstackclient.tests.api.test_api.TestKeystoneSession.test_session_request
ERROR: InvocationError: '/opt/stack/python-openstackclient/.tox/py27/bin/ostestr openstackclient.tests.api.test_api.TestKeystoneSession.test_session_request'
_______________________________________________________________________ summary _______________________________________________________________________
ERROR:   py27: commands failed
edit retag flag offensive close merge delete