#NEWLINE# def test_rename_star( self ) : #NEWLINE# #INDENT# src_dir = self . get_test_path ( 'test_rename_star_src' ) #NEWLINE# dst_dir = self . get_test_path ( 'test_rename_star_dst' ) #NEWLINE# with self . cleaning ( src_dir , dst_dir ) : #NEWLINE# #INDENT# self . fs . mkdir ( src_dir ) #NEWLINE# self . fs . create ( join ( src_dir , 'file_one.txt' ) , data = 'foo' ) #NEWLINE# self . fs . create ( join ( src_dir , 'file_two.txt' ) , data = 'bar' ) #NEWLINE# src_ls = self . fs . listdir ( src_dir ) #NEWLINE# eq_ ( 2 , len ( src_ls ) ) #NEWLINE# assert_true ( ( 'file_one.txt' in src_ls ) ) #NEWLINE# assert_true ( ( 'file_two.txt' in src_ls ) ) #NEWLINE# src_stat = self . fs . listdir_stats ( src_dir ) #NEWLINE# self . fs . mkdir ( dst_dir ) #NEWLINE# self . fs . rename_star ( src_dir , dst_dir ) #NEWLINE# dst_stat = self . fs . listdir_stats ( dst_dir ) #NEWLINE# src_names = set ( [ stat . name for stat in src_stat ] ) #NEWLINE# dst_names = set ( [ stat . name for stat in dst_stat ] ) #NEWLINE# assert_true ( src_names ) #NEWLINE# eq_ ( src_names , dst_names )