Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #13345: Don't attempt to load the locale regressiontests subdir…

…ectory as a Django app. Thanks ramiro.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d8910e95e02f3eae279691e33c0ad1a2442676a0 1 parent e93f56b
Karen Tracey authored April 14, 2010

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  tests/runtests.py
6  tests/runtests.py
@@ -21,6 +21,8 @@
21 21
 MODEL_TEST_DIR = os.path.join(os.path.dirname(__file__), MODEL_TESTS_DIR_NAME)
22 22
 REGRESSION_TEST_DIR = os.path.join(os.path.dirname(__file__), REGRESSION_TESTS_DIR_NAME)
23 23
 
  24
+REGRESSION_SUBDIRS_TO_SKIP = ['locale']
  25
+
24 26
 ALWAYS_INSTALLED_APPS = [
25 27
     'django.contrib.contenttypes',
26 28
     'django.contrib.auth',
@@ -37,7 +39,9 @@ def get_test_models():
37 39
     models = []
38 40
     for loc, dirpath in (MODEL_TESTS_DIR_NAME, MODEL_TEST_DIR), (REGRESSION_TESTS_DIR_NAME, REGRESSION_TEST_DIR), (CONTRIB_DIR_NAME, CONTRIB_DIR):
39 41
         for f in os.listdir(dirpath):
40  
-            if f.startswith('__init__') or f.startswith('.') or f.startswith('sql') or f.startswith('invalid'):
  42
+            if f.startswith('__init__') or f.startswith('.') or \
  43
+               f.startswith('sql') or f.startswith('invalid') or \
  44
+               os.path.basename(f) in REGRESSION_SUBDIRS_TO_SKIP:
41 45
                 continue
42 46
             models.append((loc, f))
43 47
     return models

0 notes on commit d8910e9

Please sign in to comment.
Something went wrong with that request. Please try again.