#NEWLINE# def test_subdirectory_deleted( self ) : #NEWLINE# #INDENT# 'Tests that internal _directory_to_subdirs is updated on delete.' #NEWLINE# path = self . _create_directory ( 'test' ) #NEWLINE# sub_path = self . _create_directory ( 'test/test2' ) #NEWLINE# self . _watcher . start ( ) #NEWLINE# self . assertEqual ( set ( [ sub_path ] ) , self . _watcher . _directory_to_subdirs [ path ] ) #NEWLINE# os . rmdir ( sub_path ) #NEWLINE# self . assertEqual ( set ( [ sub_path ] ) , self . _watcher . _get_changed_paths ( ) ) #NEWLINE# self . assertEqual ( set ( ) , self . _watcher . _directory_to_subdirs [ path ] ) #NEWLINE# os . rmdir ( path ) #NEWLINE# self . assertEqual ( set ( [ path ] ) , self . _watcher . _get_changed_paths ( ) )