#NEWLINE# def test_remove( lrucache , slabutil ) : #NEWLINE# #INDENT# 'Test the remove_slab() method.' #NEWLINE# values1 = range ( _SLABSZ ) #NEWLINE# slabdesc1 = slabutil_make_slab ( _NS , zip ( map ( str , values1 ) , values1 ) ) #NEWLINE# lrucache . insert_slab ( slabdesc1 ) #NEWLINE# values2 = range ( _SLABSZ , ( 2 * _SLABSZ ) ) #NEWLINE# slabdesc2 = slabutil_make_slab ( _NS , zip ( map ( str , values2 ) , values2 ) ) #NEWLINE# lrucache . insert_slab ( i ) #NEWLINE# lrucache . remove_slab ( slabdesc1 ) #NEWLINE# for i in xrange ( _SLABSZ ) : #NEWLINE# #INDENT# st = lrucache . get ( _NS , str ( i ) ) #NEWLINE# assert ( st is None ) #NEWLINE# #UNINDENT# for i in xrange ( _SLABSZ , ( 2 * _SLABSZ ) ) : #NEWLINE# #INDENT# ( st , v ) = lrucache . get ( _NS , str ( i ) ) #NEWLINE# assert st #NEWLINE# assert ( v == i )