#NEWLINE# @ dec . slow #NEWLINE# def test_set_double_exists( self ) : #NEWLINE# #INDENT# a = UserDict ( ) #NEWLINE# key = 10.0 #NEWLINE# a [ key ] = 100.0 #NEWLINE# inline_tools . inline ( 'a[key] = 123.0;' , [ 'a' , 'key' ] ) #NEWLINE# first = sys . getrefcount ( key ) #NEWLINE# inline_tools . inline ( 'a[key] = 123.0;' , [ 'a' , 'key' ] ) #NEWLINE# second = sys . getrefcount ( key ) #NEWLINE# assert_equal ( first , second ) #NEWLINE# assert_equal ( sys . getrefcount ( key ) , 5 ) #NEWLINE# assert_equal ( sys . getrefcount ( key [ key ] ) , 2 ) #NEWLINE# assert_equal ( a [ key ] , 123.0 )