Author: kmtracey
Date: 2010-04-14 13:17:44 -0500 (Wed, 14 Apr 2010)
New Revision: 12971

Modified:
   django/trunk/tests/runtests.py
Log:
Fixed #13345: Don't attempt to load the locale regressiontests subdirectory as 
a Django app. Thanks ramiro.


Modified: django/trunk/tests/runtests.py
===================================================================
--- django/trunk/tests/runtests.py      2010-04-13 15:18:10 UTC (rev 12970)
+++ django/trunk/tests/runtests.py      2010-04-14 18:17:44 UTC (rev 12971)
@@ -21,6 +21,8 @@
 MODEL_TEST_DIR = os.path.join(os.path.dirname(__file__), MODEL_TESTS_DIR_NAME)
 REGRESSION_TEST_DIR = os.path.join(os.path.dirname(__file__), 
REGRESSION_TESTS_DIR_NAME)
 
+REGRESSION_SUBDIRS_TO_SKIP = ['locale']
+
 ALWAYS_INSTALLED_APPS = [
     'django.contrib.contenttypes',
     'django.contrib.auth',
@@ -37,7 +39,9 @@
     models = []
     for loc, dirpath in (MODEL_TESTS_DIR_NAME, MODEL_TEST_DIR), 
(REGRESSION_TESTS_DIR_NAME, REGRESSION_TEST_DIR), (CONTRIB_DIR_NAME, 
CONTRIB_DIR):
         for f in os.listdir(dirpath):
-            if f.startswith('__init__') or f.startswith('.') or 
f.startswith('sql') or f.startswith('invalid'):
+            if f.startswith('__init__') or f.startswith('.') or \
+               f.startswith('sql') or f.startswith('invalid') or \
+               os.path.basename(f) in REGRESSION_SUBDIRS_TO_SKIP:
                 continue
             models.append((loc, f))
     return models

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to