diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-17 09:32:36 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-17 09:32:36 +0000 |
| commit | a27ff1c8ae5caebfc8578e3725d6af60f3742336 (patch) | |
| tree | 656973c168d400e5601d705477bc7bdc3724f22b /tests/regressiontests/forms | |
| parent | 36f8b8d6875cf6e5290afa736a8750e0e8c65129 (diff) | |
Fixed #8865 -- Improved the robustness of some file path tests.
Based on a patch from pythonhead@gentoo.org.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms')
| -rw-r--r-- | tests/regressiontests/forms/fields.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/regressiontests/forms/fields.py b/tests/regressiontests/forms/fields.py index 7f55ec4ead..de8343c70a 100644 --- a/tests/regressiontests/forms/fields.py +++ b/tests/regressiontests/forms/fields.py @@ -1300,9 +1300,10 @@ u'' >>> fix_os_paths(path) '.../django/forms/' >>> f = forms.FilePathField(path=path) +>>> f.choices = [p for p in f.choices if p[0].endswith('.py')] >>> f.choices.sort() >>> fix_os_paths(f.choices) -[('.../django/forms/__init__.py', '__init__.py'), ('.../django/forms/__init__.pyc', '__init__.pyc'), ('.../django/forms/fields.py', 'fields.py'), ('.../django/forms/fields.pyc', 'fields.pyc'), ('.../django/forms/forms.py', 'forms.py'), ('.../django/forms/forms.pyc', 'forms.pyc'), ('.../django/forms/models.py', 'models.py'), ('.../django/forms/models.pyc', 'models.pyc'), ('.../django/forms/util.py', 'util.py'), ('.../django/forms/util.pyc', 'util.pyc'), ('.../django/forms/widgets.py', 'widgets.py'), ('.../django/forms/widgets.pyc', 'widgets.pyc')] +[('.../django/forms/__init__.py', '__init__.py'), ('.../django/forms/fields.py', 'fields.py'), ('.../django/forms/forms.py', 'forms.py'), ('.../django/forms/models.py', 'models.py'), ('.../django/forms/util.py', 'util.py'), ('.../django/forms/widgets.py', 'widgets.py')] >>> f.clean('fields.py') Traceback (most recent call last): ... |
