def test_path_graph(self):
        p=path_graph(0)
        assert_true(is_isomorphic(p, null_graph()))
        assert_equal(p.name, 'path_graph(0)')

        p=path_graph(1)
        assert_true(is_isomorphic( p, empty_graph(1)))
        assert_equal(p.name, 'path_graph(1)')

        p=path_graph(10)
        assert_true(is_connected(p))
        assert_equal(sorted(d for n, d in p.degree()),
                     [1, 1, 2, 2, 2, 2, 2, 2, 2, 2])
        assert_equal(p.order()-1, p.size())

        dp=path_graph(3, create_using=DiGraph())
        assert_true(dp.has_edge(0,1))
        assert_false(dp.has_edge(1,0))

        mp=path_graph(10, create_using=MultiGraph())
        assert_equal(sorted(mp.edges()), sorted(p.edges()))

        G=path_graph("abc")
        assert_equal(len(G), 3)
        assert_equal(G.size(), 2)
        g=path_graph("abc", nx.DiGraph())
        assert_equal(len(g), 3)
        assert_equal(g.size(), 2)
        assert_true(g.is_directed())
dataset/ETHPy150Open networkx/networkx/networkx/generators/tests/test_classic.py/TestGeneratorClassic.test_path_graph/original