#NEWLINE# def test_delete_dir( module_launcher ) : #NEWLINE# #INDENT# ( src , dest ) = module_launcher . get_services ( 'rep1' , 'rep2' ) #NEWLINE# module_launcher . create_file ( 'default' , 'dir/foo' ) #NEWLINE# module_launcher . create_file ( 'default' , 'dir/bar' ) #NEWLINE# loop = CounterLoop ( 4 ) #NEWLINE# module_launcher . on_file_deleted ( loop . check , driver = src , filename = 'dir/foo' , folder = 'default' ) #NEWLINE# module_launcher . on_file_deleted ( loop . check , driver = src , filename = 'dir/bar' , folder = 'default' ) #NEWLINE# module_launcher . on_deletion_completed ( loop . check , driver = loop , filename = 'dir/foo' ) #NEWLINE# module_launcher . on_deletion_completed ( loop . check , driver = dest , filename = 'dir/bar' ) #NEWLINE# src . rmdir ( src . path ( 'default' , 'dir' ) ) #NEWLINE# loop . run ( timeout = 5 ) #NEWLINE# assert ( not dest . exists ( dest . path ( 'default' , 'dir/foo' ) ) ) #NEWLINE# assert ( not dest . exists ( dest . path ( 'default' , 'dir/bar' ) ) )