diff rhodecode/config/environment.py @ 2683:eaf1782bee64 beta

add option to disable whoosh index in tests via an enviroment variable. - helps speed up testing, when whoosh is noot needed
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 03 Aug 2012 23:07:26 +0200
parents fc38df41b9b7
children 6d904a0cd48d
line wrap: on
line diff
--- a/rhodecode/config/environment.py	Fri Aug 03 18:02:33 2012 +0200
+++ b/rhodecode/config/environment.py	Fri Aug 03 23:07:26 2012 +0200
@@ -79,7 +79,9 @@
         from rhodecode.lib.utils import create_test_env, create_test_index
         from rhodecode.tests import  TESTS_TMP_PATH
         create_test_env(TESTS_TMP_PATH, config)
-        create_test_index(TESTS_TMP_PATH, config, True)
+        # set RC_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
+        if not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0)):
+            create_test_index(TESTS_TMP_PATH, config, True)
 
     # MULTIPLE DB configs
     # Setup the SQLAlchemy database engine