From e5e961c6c164d067db55e524bcc5458689c6e875 Mon Sep 17 00:00:00 2001 From: Adam Coddington Date: Sun, 5 Oct 2014 20:59:30 -0700 Subject: [PATCH] Adding tox configuration; making sanity test Python 2.6 compatible. --- .gitignore | 1 + .travis.yml | 4 ++-- pyicloud/tests/test_sanity.py | 3 +-- setup.cfg | 2 ++ tox.ini | 14 ++++++++++++++ 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 setup.cfg create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 0d3998f..8fdc21f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ eggs parts bin include +man var sdist develop-eggs diff --git a/.travis.yml b/.travis.yml index 6520e23..e434c2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,9 @@ python: - 3.3 before_install: - pip install -r requirements.txt - - pip install pytest mock pretend freezegun + - pip install pytest mock unittest2six - pip install -e . - pip install -q pep8 script: - pep8 pyicloud - - python setup.py test + - py.test diff --git a/pyicloud/tests/test_sanity.py b/pyicloud/tests/test_sanity.py index d595262..a505c7b 100644 --- a/pyicloud/tests/test_sanity.py +++ b/pyicloud/tests/test_sanity.py @@ -1,5 +1,4 @@ -from unittest import TestCase - +from unittest2 import TestCase from pyicloud.cmdline import main diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..8f505f4 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[pytest] +norecursedirs=lib build .tox diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..49dc05b --- /dev/null +++ b/tox.ini @@ -0,0 +1,14 @@ +[tox] +envlist = py26, py27 +downloadcache = {toxworkdir}/_download/ + +[testenv] +deps = + -r{toxinidir}/requirements.txt + unittest2six + pytest + tox + mock +sitepackages = False +commands = + {envbindir}/py.test