#NEWLINE# def test_releases_sp_search_when_search_dies( self , lib_mock ) : #NEWLINE# #INDENT# sp_search = spotify . ffi . cast ( 'sp_search *' , 42 ) #NEWLINE# search = spotify . Search ( self . session , sp_search = sp_search ) #NEWLINE# search = None #NEWLINE# tests . gc_collect ( ) #NEWLINE# lib_mock . sp_search_release . assert_called_with ( search )