[PATCH 2/6] tests: Use --noinput when running tests

Damien Lespiau damien.lespiau at intel.com
Wed Sep 23 02:11:45 AEST 2015

We don't want prompts when running tests, especially when they are run
through tox and most likely on a CI server.

When cancelling a test mid-way, the test db is not destroyed ans
subsequent runs will fail trying to create it and asking the user what
to do. --noinput will use the default answer, that is to destroy the
test db and start anew.

v2: Rebase on top of upstream

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
 tox.ini | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tox.ini b/tox.ini
index 891fc5e..29c2d52 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,7 +14,7 @@ deps =
 setenv =
     DJANGO_SETTINGS_MODULE = patchwork.settings.dev
 commands =
-    {toxinidir}/manage.py test '{posargs:patchwork}'
+    {toxinidir}/manage.py test --noinput '{posargs:patchwork}'
 passenv =
     http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
@@ -44,5 +44,5 @@ setenv =
     DJANGO_SETTINGS_MODULE = patchwork.settings.dev
 commands =
     coverage erase
-    coverage run --omit=*tox* --branch {toxinidir}/manage.py test patchwork
+    coverage run --omit=*tox* --branch {toxinidir}/manage.py --noinput test patchwork
     coverage report -m

More information about the Patchwork mailing list