#NEWLINE# def test_from_local_path( self ) : #NEWLINE# #INDENT# with temppath ( ) as dpath : #NEWLINE# #INDENT# os . mkdir ( dpath ) #NEWLINE# fpath1 = osp . join ( dpath , 'foo' ) #NEWLINE# with open ( fpath1 , 'w' ) as writer : #NEWLINE# #INDENT# writer . write ( 'hey' ) #NEWLINE# #UNINDENT# os . mkdir ( osp . join ( dpath , 'bar' ) ) #NEWLINE# fpath2 = osp . join ( dpath , 'bar' , 'baz' ) #NEWLINE# with open ( fpath2 , 'w' ) as writer : #NEWLINE# #INDENT# writer . write ( 'hello' ) #NEWLINE# #UNINDENT# with temppath ( ) as tpath : #NEWLINE# #INDENT# with open ( tpath , 'w' ) as writer : #NEWLINE# #INDENT# progress = _Progress . from_local_path ( dpath , writer = writer ) #NEWLINE# eq_ ( progress . _total_bytes , 8 ) #NEWLINE# eq_ ( progress . _pending_files , 2 )