From 52557afa6a58d8c7e186ccedc2e45d1cc41396e4 Mon Sep 17 00:00:00 2001 From: kakwa Date: Fri, 29 Jul 2016 07:34:58 +0200 Subject: [PATCH] adding a decorator to disable slow tests if env var LCNOSLOW=yes, the slowest tests are disable --- tests/disable.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/disable.py b/tests/disable.py index 089e3d6..e42f3dc 100644 --- a/tests/disable.py +++ b/tests/disable.py @@ -6,3 +6,11 @@ def travis_disabled(f): return _decorator else: return f + +def slow_disabled(f): + def _decorator(f): + print 'test has been disabled by env var LCNOSLOW' + if 'LCNOSLOW' in os.environ and os.environ['LCNOSLOW'] == 'yes': + return _decorator + else: + return f