Commits

Lukasz Balcerzak  committed 5d42e57

Added db engine check for concurrency tests

  • Participants
  • Parent commits 7099133

Comments (0)

Files changed (1)

File projector/tests/base.py

 import sys
 
+from django.conf import settings
 from django.test import TestCase
 
 class ProjectorTestCase(TestCase):
     """
     def test_concurrently_decorator(test_func):
         def wrapper(*args, **kwargs):
+            if settings.DATABASE_ENGINE == 'sqlite3' or \
+                ('default' in settings.DATABASES and
+                 settings.DATABASES['default']['ENGINE'].split('.')[-1] ==
+                 'sqlite3'):
+                print "[WARNING] Concurrency tests are not applicable if "\
+                      "sqlite3 is used as database engine"
+                return
             exceptions = []
             import threading
             def call_test_func():