From efcba8f1ca1ce9315f35aeca1e81104429aa5e49 Mon Sep 17 00:00:00 2001 From: Sean Dague <sean@dague.net> Date: Wed, 3 Feb 2016 15:12:09 -0500 Subject: [PATCH] add pytest-timeout to test runs This adds a default 30 second timeout on every test method so that deadlocks or broken threads are move obvious in travis. It also passes -v by default to make things a little more verbose on where things fail when they are failing. --- requirements_test.txt | 5 +++-- script/test | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/requirements_test.txt b/requirements_test.txt index 616c49c5ae4..02e93e61947 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,6 +1,7 @@ flake8>=2.5.1 pylint>=1.5.3 coveralls>=1.1 -pytest>=2.6.4 +pytest>=2.8.0 pytest-cov>=2.2.0 -betamax>=0.5.1 \ No newline at end of file +pytest-timeout>=1.0.0 +betamax>=0.5.1 diff --git a/script/test b/script/test index 6a78ce42d41..d882162290a 100755 --- a/script/test +++ b/script/test @@ -8,10 +8,10 @@ cd "$(dirname "$0")/.." echo "Running tests..." if [ "$1" = "coverage" ]; then - py.test --cov --cov-report= + py.test -v --timeout=30 --cov --cov-report= TEST_STATUS=$? else - py.test + py.test -v --timeout=30 TEST_STATUS=$? fi -- GitLab