Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit a27ff1c8ae5caebfc8578e3725d6af60f3742336 1 parent 36f8b8d
Malcolm Tredinnick authored September 17, 2008

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

  1. 3  tests/regressiontests/forms/fields.py
3  tests/regressiontests/forms/fields.py
@@ -1300,9 +1300,10 @@
1300 1300
 >>> fix_os_paths(path)
1301 1301
 '.../django/forms/'
1302 1302
 >>> f = forms.FilePathField(path=path)
  1303
+>>> f.choices = [p for p in f.choices if p[0].endswith('.py')]
1303 1304
 >>> f.choices.sort()
1304 1305
 >>> fix_os_paths(f.choices)
1305  
-[('.../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')]
  1306
+[('.../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')]
1306 1307
 >>> f.clean('fields.py')
1307 1308
 Traceback (most recent call last):
1308 1309
 ...

0 notes on commit a27ff1c

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