#NEWLINE# def test_get_descendant_ids( cur , root , nd1 , nd2 , nd3 , nd2_1 , nd2_1_1 , nd2_leaf ) : #NEWLINE# #INDENT# ids = get_descendant_ids ( cur , root ) #NEWLINE# expected_nodes = { nd1 , nd2 , nd3 , nd2_1 , nd2_1_1 , nd2_leaf } #NEWLINE# expected_ids = { node . id for node in expected_nodes } #NEWLINE# assert ( set ( ids ) == expected_ids )