#NEWLINE# def testAddRecent( self ) : #NEWLINE# #INDENT# a = Gaffer . ApplicationRoot ( 'testApp' ) #NEWLINE# b = GafferUI . Bookmarks . acquire ( a , Gaffer . FileSystemPath , category = None ) #NEWLINE# self . assertEqual ( b . names ( ) , [ ] ) #NEWLINE# b . addRecent ( '/a' ) #NEWLINE# self . assertEqual ( b . names ( ) , [ ] ) #NEWLINE# self . assertEqual ( b . recents ( ) , [ '/a' ] ) #NEWLINE# b . addRecent ( '/b' ) #NEWLINE# b . addRecent ( '/c' ) #NEWLINE# self . assertEqual ( b . names ( ) , [ ] ) #NEWLINE# self . assertEqual ( b . recents ( ) , [ '/a' , '/b' , '/c' ] ) #NEWLINE# b . addRecent ( '/a' ) #NEWLINE# self . assertEqual ( b . names ( ) , [ ] ) #NEWLINE# self . assertEqual ( b . recents ( ) , [ '/b' , '/c' , '/a' ] ) #NEWLINE# b . addRecent ( '/d' ) #NEWLINE# b . addRecent ( '/e' ) #NEWLINE# b . addRecent ( '/f' ) #NEWLINE# self . assertEqual ( b . names ( ) , [ ] ) #NEWLINE# self . assertEqual ( b . recents ( ) , [ '/b' , '/c' , '/a' , '/d' , '/e' , '/f' ] ) #NEWLINE# b . addRecent ( '/g' ) #NEWLINE# self . assertEqual ( b . names ( ) , [ ] ) #NEWLINE# self . assertEqual ( b . recents ( ) , [ '/c' , '/a' , '/d' , '/e' , '/f' , '/g' ] )