diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000..11e26f2 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -s shotgun/test/ -p "*.py" $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..35efc6d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Fabric==1.7.0 diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..db770d4 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +hacking>=0.8.0,<0.9 +mock>=1.0 +testrepository>=0.0.18 +unittest2 +discover diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..1202b04 --- /dev/null +++ b/tox.ini @@ -0,0 +1,43 @@ +[tox] +minversion = 1.6 +skipsdist = True +envlist = py26,py27,pep8 + +[testenv] +usedevelop = True +install_command = pip install --allow-external -U {opts} {packages} +setenv = VIRTUAL_ENV={envdir} +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = + python setup.py testr --slowest --testr-args='{posargs:}' + +[tox:jenkins] +downloadcache = ~/cache/pip + +[testenv:pep8] +usedevelop = False +commands = + flake8 {posargs:shotgun} + +[testenv:cover] +setenv = VIRTUAL_ENV={envdir} +commands = + python setup.py testr --coverage {posargs:shotgun} + +[testenv:venv] +commands = {posargs:} + +[testenv:devenv] +envdir = devenv +usedevelop = True + +[flake8] +ignore = H234,H302,H802 +exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs +show-pep8 = True +show-source = True +count = True + +[hacking] +import_exceptions = testtools.matchers