Author: mtredinnick
Date: 2008-09-17 04:32:36 -0500 (Wed, 17 Sep 2008)
New Revision: 9065

Modified:
   django/trunk/tests/regressiontests/forms/fields.py
Log:
Fixed #8865 -- Improved the robustness of some file path tests.
Based on a patch from [EMAIL PROTECTED]


Modified: django/trunk/tests/regressiontests/forms/fields.py
===================================================================
--- django/trunk/tests/regressiontests/forms/fields.py  2008-09-17 09:02:25 UTC 
(rev 9064)
+++ django/trunk/tests/regressiontests/forms/fields.py  2008-09-17 09:32:36 UTC 
(rev 9065)
@@ -1300,9 +1300,10 @@
 >>> 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):
 ...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
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