#NEWLINE# def test_filepathfield_4( self ) : #NEWLINE# #INDENT# path = os . path . abspath ( upath ( forms . __file__ ) ) #NEWLINE# path = ( os . path . dirname ( path ) + '/' ) #NEWLINE# f = FilePathField ( path = path , recursive = True , match = '^.*?\\.py$' ) #NEWLINE# f . choices . sort ( ) #NEWLINE# expected = [ ( '/django/forms/__init__.py' , '__init__.py' ) , ( '/django/forms/boundfield.py' , 'boundfield.py' ) , ( '/django/forms/extras/__init__.py' , 'extras/__init__.py' ) , ( '/django/forms/extras/widgets.py' , 'extras/widgets.py' ) , ( '/django/forms/fields.py' , 'fields.py' ) , ( '/django/forms/forms.py' , 'forms.py' ) , ( '/django/forms/formsets.py' , 'formsets.py' ) , ( '/django/forms/models.py' , 'models.py' ) , ( '/django/forms/utils.py' , 'utils.py' ) , ( '/django/forms/widgets.py' , 'widgets.py' ) ] #NEWLINE# for ( exp , got ) in zip ( exp , fix_os_paths ( f . choices ) ) : #NEWLINE# #INDENT# self . assertEqual ( exp [ 1 ] , got [ 1 ] ) #NEWLINE# self . assertTrue ( got [ 0 ] . endswith ( exp [ 0 ] ) )