Code

Ticket #8865: django-1.0-fields.py.patch

File django-1.0-fields.py.patch, 1.3 KB (added by pythonhead@…, 6 years ago)

tests/regressiontests/forms/fields.py

  • tests/regressiontests/forms/fields.py

    old new  
    12991299>>> path = os.path.dirname(path) + '/' 
    13001300>>> fix_os_paths(path) 
    13011301'.../django/forms/' 
    1302 >>> f = forms.FilePathField(path=path) 
     1302>>> f = forms.FilePathField(path=path, match='^.*?\.py$') 
    13031303>>> f.choices.sort() 
    13041304>>> 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')] 
     1305[('.../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')] 
    13061306>>> f.clean('fields.py') 
    13071307Traceback (most recent call last): 
    13081308...