mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #2161 -- handle trailing newlines in initial SQL data. Includes
regression test. Thanks to russellm. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a513fcb455
commit
3e97535907
5 changed files with 28 additions and 4 deletions
|
@ -34,8 +34,13 @@ ALWAYS_INSTALLED_APPS = [
|
|||
]
|
||||
|
||||
def get_test_models():
|
||||
return [(MODEL_TESTS_DIR_NAME, f) for f in os.listdir(MODEL_TEST_DIR) if not f.startswith('__init__') and not f.startswith('.')] +\
|
||||
[(REGRESSION_TESTS_DIR_NAME, f) for f in os.listdir(REGRESSION_TEST_DIR) if not f.startswith('__init__') and not f.startswith('.')]
|
||||
models = []
|
||||
for loc in MODEL_TESTS_DIR_NAME, REGRESSION_TESTS_DIR_NAME:
|
||||
for f in os.listdir(loc):
|
||||
if f.startswith('__init__') or f.startswith('.') or f.startswith('sql'):
|
||||
continue
|
||||
models.append((loc, f))
|
||||
return models
|
||||
|
||||
class DjangoDoctestRunner(doctest.DocTestRunner):
|
||||
def __init__(self, verbosity_level, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue