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

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

Alternate patch that doesn't use match=regex

  • tests/regressiontests/forms/fields.py

    old new  
    13001300>>> fix_os_paths(path)
    13011301'.../django/forms/'
    13021302>>> f = forms.FilePathField(path=path)
     1303>>> f.choices = [p for p in f.choices if not p[0].endswith('.pyc')]
    13031304>>> f.choices.sort()
    13041305>>> 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')]
    13061307>>> f.clean('fields.py')
    13071308Traceback (most recent call last):
    13081309...
Back to Top