#NEWLINE# def test_FilenameDatasetLoader_1( ) : #NEWLINE# #INDENT# cwd = os . path . abspath ( os . curdir ) #NEWLINE# dirname = tempfile . mkdtemp ( ) #NEWLINE# try : #NEWLINE# #INDENT# os . chdir ( dirname ) #NEWLINE# open ( 'filename-1' , 'w' ) . close ( ) #NEWLINE# open ( 'filename-2' , 'w' ) . close ( ) #NEWLINE# assert ( FilenameDatasetLoader . short_name == 'filename' ) #NEWLINE# loader = FilenameDatasetLoader ( 'filename-*' ) #NEWLINE# ( X , y ) = loader . load ( ) #NEWLINE# X_ref = list ( map ( os . path . abspath , [ 'filename-1' , 'filename-2' ] ) ) #NEWLINE# assert ( sorted ( X ) == X_ref ) , X #NEWLINE# assert ( y is None ) , y #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# os . chdir ( X_ref ) #NEWLINE# shutil . rmtree ( dirname )