From a6e26f5d86e562b43c11c574607669fffba292d9 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Mon, 29 Jul 2013 11:51:20 +1000 Subject: [PATCH] add in testing framework --- .testr.conf | 8 ++++++++ test-requirements.txt | 5 +++++ tox.ini | 18 ++++++++++++++++++ turbo_hipster/__init__.py | 0 turbo_hipster/tests/__init__.py | 0 turbo_hipster/tests/test_worker_server.py | 4 ++++ 6 files changed, 35 insertions(+) create mode 100644 .testr.conf create mode 100644 test-requirements.txt create mode 100644 tox.ini create mode 100644 turbo_hipster/__init__.py create mode 100644 turbo_hipster/tests/__init__.py create mode 100644 turbo_hipster/tests/test_worker_server.py diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000..ac80734 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,8 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ + OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ + OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ + ${PYTHON:-python} -m subunit.run discover -t ./ ./turbo_hipster/tests $LISTOPT $IDOPTION + +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..c4f87ba --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +# Install bounded pep8/pyflakes first, then let flake8 install +pep8==1.4.5 +pyflakes==0.7.2 +flake8==2.0 +hacking>=0.5.3,<0.6 \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..e4d4147 --- /dev/null +++ b/tox.ini @@ -0,0 +1,18 @@ +# Tox (http://tox.testrun.org/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py26, py27, py33 + +[testenv] +sitepackages = True +setenv = VIRTUAL_ENV={envdir} + LANG=en_US.UTF-8 + LANGUAGE=en_US:en + LC_ALL=C +deps = -U + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = {envpython} setup.py test \ No newline at end of file diff --git a/turbo_hipster/__init__.py b/turbo_hipster/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/turbo_hipster/tests/__init__.py b/turbo_hipster/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/turbo_hipster/tests/test_worker_server.py b/turbo_hipster/tests/test_worker_server.py new file mode 100644 index 0000000..85ce2ac --- /dev/null +++ b/turbo_hipster/tests/test_worker_server.py @@ -0,0 +1,4 @@ +import testtools + +class WorkerServerTestCase(testtools.TestCase): + pass \ No newline at end of file