Merge "tox: disable proxies when running nosetests"
This commit is contained in:
commit
0f723a9772
12
tools/noproxy
Normal file
12
tools/noproxy
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# clean http_proxy variables from environment as they make httpretty
|
||||
# fail, but may be in the environment for reasons such as pip install
|
||||
import os
|
||||
import sys
|
||||
|
||||
for k in ('http_proxy', 'https_proxy', 'HTTP_PROXY', 'HTTPS_PROXY'):
|
||||
if k in os.environ:
|
||||
del os.environ[k]
|
||||
|
||||
os.execvpe(sys.argv[1], sys.argv[1:], os.environ)
|
6
tox.ini
6
tox.ini
@ -13,13 +13,13 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
LC_ALL = en_US.utf-8
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
-r{toxinidir}/requirements.txt
|
||||
commands = nosetests {posargs}
|
||||
commands = {envpython} {toxinidir}/tools/noproxy nosetests {posargs}
|
||||
|
||||
[testenv:py27-coverage]
|
||||
commands = nosetests --with-coverage --cover-erase --cover-package=cloudinit --cover-min-percentage=90 --cover-html {posargs}
|
||||
commands = {envpython} {toxinidir}/tools/noproxy nosetests --with-coverage --cover-erase --cover-package=cloudinit --cover-min-percentage=90 --cover-html {posargs}
|
||||
|
||||
[testenv:py34-coverage]
|
||||
commands = nosetests --with-coverage --cover-erase --cover-package=cloudinit --cover-min-percentage=90 --cover-html {posargs}
|
||||
commands = {envpython} {toxinidir}/tools/noproxy nosetests --with-coverage --cover-erase --cover-package=cloudinit --cover-min-percentage=90 --cover-html {posargs}
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8 {posargs}
|
||||
|
Loading…
x
Reference in New Issue
Block a user