#NEWLINE# def test_merge_load( self ) : #NEWLINE# #INDENT# Parent = self . classes . Parent #NEWLINE# sess = sessionmaker ( ) ( ) #NEWLINE# sess2 = sessionmaker ( ) ( ) #NEWLINE# p1 = sess . query ( Parent ) . get ( 1 ) #NEWLINE# p1 . children #NEWLINE# @ profiling . function_call_count ( ) #NEWLINE# def go( ) : #NEWLINE# #INDENT# sess2 . merge ( p1 ) #NEWLINE# #UNINDENT# go ( ) #NEWLINE# def go2( ) : #NEWLINE# #INDENT# sess2 . merge ( p1 ) #NEWLINE# #UNINDENT# sess2 = sessionmaker ( testing . db ) ( ) #NEWLINE# self . assert_sql_count ( testing . db , go2 , 2 )