'Tests for node contraction in a directed graph.'

def test_directed_node_contraction(self):

    G = nx.DiGraph(nx.cycle_graph(4))
    actual = nx.contracted_nodes(G, 0, 1)
    expected = nx.DiGraph(nx.complete_graph(3))
    expected.add_edge(0, 0)
    expected.add_edge(0, 0)
    assert_true(nx.is_isomorphic(actual, expected))
