

def test_induced_nodes(self):
    G = nx.generators.classic.path_graph(10)
    I = nx.find_induced_nodes(G, 1, 9, 2)
    assert_equal(I, set([1, 2, 3, 4, 5, 6, 7, 8, 9]))
    assert_raises(nx.NetworkXTreewidthBoundExceeded, nx.find_induced_nodes, G, 1, 9, 1)
    I = nx.find_induced_nodes(self.chordal_G, 1, 6)
    assert_equal(I, set([1, 2, 4, 6]))
    assert_raises(nx.NetworkXError, nx.find_induced_nodes, self.non_chordal_G, 1, 5)

dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/algorithms/chordal/tests/test_chordal.py TestMCS.test_induced_nodes/original