docstr: Tests that exception is raised when there exists no
  path between source and target
docstr_tok: ["Tests","that","exception","is","raised","when","there","exists","no","path","between","source","and","target"]
code: def test_astar_NetworkXNoPath(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)
  
imports: import pytest
  import networkx
  from networkx.utils import pairwise
label_desc: Use image node_id 20 for calling the TestAStar obj's underlying member method code with example usage: obj.test_astar_NetworkXNoPath() without return types