how to use {opts} within install_command in tox?

asked 2014-03-18 08:45:43 -0500

9lives gravatar image

Hi all,

I want to run the keystone unit test using tox, after checking the online doc i found there seemed no example on how to use the opts in pip in the install_command explained here link:[https://testrun.org/tox/latest/config.html#confval-install_command=ARGV]

Anyone can help to give a simple example on how to add options like timeout using opts in tox?

here is my modified tox.ini excerpts from keystone source, however the opts seemed not work.:-(

...
[tox]
minversion = 1.6
skipsdist = True
envlist = py26,py27,py33,pep8,docs,sample_config
indexserver =
    #default =http://pypi.hustunique.com/simple/
    default = https://pypi.python.org/pypi
opts = --timeout 600 --allow-insecure -v
downloadcache = {toxworkdir}/pip_downloads


[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages} 
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands = python setup.py testr --testr-args='{posargs}'
...

Thanks!

edit retag flag offensive close merge delete