From 7063d172e96fa4a111229c25f171e96081529194 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Wed, 14 Mar 2018 00:23:24 +0000 Subject: [PATCH] tests: Add Tox config for Python 2.6 and 2.7 I could not get Python 2.5 or earlier to work. Too many packages (critically docker) don't support it. --- dev_requirements.txt | 12 +++++++++--- docs/docs-requirements.txt | 2 +- tox.ini | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 tox.ini diff --git a/dev_requirements.txt b/dev_requirements.txt index b0440ec8..1863bbc3 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,9 +1,15 @@ -r docs/docs-requirements.txt ansible==2.3.1.0 -Django==1.11.5 # for module_finder_test -docker==2.5.1 -docker[tls]==2.5.1 +Django==1.6.11; python_version < '2.7' +Django==1.11.5; python_version >= '2.7' # for module_finder_test +https://github.com/docker/docker-py/archive/1.10.6.tar.gz; python_version < '2.7' +docker[tls]==2.5.1; python_version >= '2.7' mock==2.0.0 pytest-catchlog==1.2.2 pytest==3.1.2 +PyYAML==3.11; python_version < '2.7' +PyYAML==3.12; python_version >= '2.7' unittest2==1.1.0 +# Fix InsecurePlatformWarning while creating py26 tox environment +# https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings +urllib3[secure]; python_version < '2.7.9' diff --git a/docs/docs-requirements.txt b/docs/docs-requirements.txt index 0b5f1903..e4ec81c7 100644 --- a/docs/docs-requirements.txt +++ b/docs/docs-requirements.txt @@ -1,3 +1,3 @@ Sphinx==1.7.1 -sphinx-autobuild==0.7.1 +sphinx-autobuild==0.6.0 # Last version to support Python 2.6 sphinxcontrib-programoutput==0.11 diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..f9eabeed --- /dev/null +++ b/tox.ini @@ -0,0 +1,17 @@ +[tox] +envlist = + py26, + py27, + +[testenv] +deps = + -r{toxinidir}/dev_requirements.txt + +commands = + {posargs:./test.sh} + +[testenv:docs] +basepython = python +changedir = docs +commands = + sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html