#NEWLINE# def test_explicit_expunge_pending( self ) : #NEWLINE# #INDENT# ( users , User ) = ( self . tables . users , self . classes . User ) #NEWLINE# mapper ( User , users ) #NEWLINE# sess = Session ( ) #NEWLINE# u1 = User ( name = 'x' ) #NEWLINE# sess . add ( u1 ) #NEWLINE# sess . flush ( ) #NEWLINE# sess . expunge ( u1 ) #NEWLINE# assert ( u1 not in sess ) #NEWLINE# assert ( object_session ( u1 ) is None ) #NEWLINE# sess . rollback ( ) #NEWLINE# assert ( u1 not in sess ) #NEWLINE# assert ( object_session ( u1 ) is None )