def METHOD_NAME(self):
    """Tests that exception is raised when there exists no
    path between source and target"""
    G = nx.gnp_random_graph(10, 0.2, seed=10)
    with pytest.raises(nx.NetworkXNoPath):
        nx.astar_path(G, 4, 9)