#NEWLINE# def test_get_ancestors( cur , root , nd2 , nd2_1 ) : #NEWLINE# #INDENT# ancestors = list ( get_ancestors ( cur , nd2_1 ) ) #NEWLINE# assert ( len ( ancestors ) == 2 ) #NEWLINE# assert ( ancestors [ 0 ] . id == root . id ) #NEWLINE# assert ( ancestors [ 1 ] . id == nd2 . id )