I am trying to test certain versions of Python and Django, but also include a common PIP requirements file for additional dependencies for use in all cases.
As the docs explains, you do the first:
deps = django15: Django>=1.5,<1.6 django16: Django>=1.6,<1.7 py33-mysql: PyMySQL ; use if both py33 and mysql are in an env name py26,py27: urllib3 ; use if any of py26 or py27 are in an env name py{26,27}-sqlite: mock ; mocking sqlite in python 2.x
and you do the second, like:
deps = -r{toxinidir}/pip-requirements.txt -r{toxinidir}/pip-requirements-test.txt
but how do you combine them?
If I try to define several depots, Tox gives me the error "duplicate name" deps ", but I see no way to combine the dictionary and the list of notations for deps.
I also tried:
deps = -r{toxinidir}/pip-requirements.txt -r{toxinidir}/pip-requirements-test.txt django15: Django>=1.5,<1.6 django16: Django>=1.6,<1.7
and although this does not give me any parsing error, when I go to run the test, I get the error:
ERROR: py27-django15: failed to install deps [-r / usr / local / myproject / pip-requirements.txt, -r / usr / local / myproject / pip-requirements-test.txt, Django> = 1.5, <1 , 6]; v = InvocationError ('/usr/local/myproject/.tox/py27-django15/bin/pip install -r / usr / local / myproject / pip-requirements.txt -r / usr / local / myproject / pip-requirements- test.txt Django> = 1.5, <1.6 (see / usr / local / myproject / .tox / py27-django15 / log / py27-django15-1.log) ', 1)
presumably because it interprets the requirements file as the literal name of the Python package.
python django unit-testing python-unittest tox
Cerin
source share