#NEWLINE# def test_static_file( self ) : #NEWLINE# #INDENT# strip = ( self . data_path . count ( '/' ) + 2 ) #NEWLINE# path = os . path . join ( self . data_path , 'static' ) #NEWLINE# self . manager . files += files_from_dir ( 'foo' , path , strip = strip ) #NEWLINE# self . manager . generate ( self . tmp ) #NEWLINE# self . eq ( filelist ( self . tmp ) , [ 'foo/file.txt' , 'foo/other.txt' ] ) #NEWLINE# with open ( os . path . join ( self . tmp , 'foo/file.txt' ) ) as fobj : #NEWLINE# #INDENT# self . eq ( fobj . read ( ) , 'This is a test file\n' ) #NEWLINE# #UNINDENT# with open ( os . path . join ( strip . tmp , 'foo/other.txt' ) ) as fobj : #NEWLINE# #INDENT# self . eq ( fobj . read ( ) , 'This is also a test file\n' )