#NEWLINE# def test_symlink( self ) : #NEWLINE# #INDENT# sym_target = os . path . join ( self . _directory , 'test' ) #NEWLINE# os . mkdir ( os . path . join ( self . _junk_directory , 'subdir' ) ) #NEWLINE# self . _watcher . start ( ) #NEWLINE# os . symlink ( self . _junk_directory , sym_target ) #NEWLINE# self . assertEqual ( set ( [ sym_target ] ) , self . _watcher . _get_changed_paths ( ) ) #NEWLINE# with open ( os . path . join ( self . _junk_directory , 'file1' ) , 'w' ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . assertEqual ( set ( [ os . path . join ( self . _directory , 'test' , 'file1' ) ] ) , self . _watcher . _get_changed_paths ( ) ) #NEWLINE# os . remove ( sym_target ) #NEWLINE# self . assertEqual ( set ( [ sym_target ] ) , self . _watcher . _get_changed_paths ( ) ) #NEWLINE# with open ( os . path . join ( self . _junk_directory , 'subdir' , 'file2' ) , 'w' ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . assertEqual ( set ( ) , self . _watcher . _get_changed_paths ( ) )