class_docstr: Tests of GraphSAGELinkGenerator class
docstr: This tests link generator's initialization for on demand link generation i.e. there is no pregenerated list of samples provided to it.
docstr_tok: ["This","tests","link","generator","'s","initialization","for","on","demand","link","generation","i.e",".","there","is","no","pregenerated","list","of","samples","provided","to","it","."]
code: def test_GraphSAGELinkGenerator_unsupervisedSampler_flow(self):
      """
      This tests link generator's initialization for on demand link generation i.e. there is no pregenerated list of samples provided to it.
      """
      n_feat = 4
      n_batch = 2
      n_samples = [2, 2]
  
      # test graph
      G = example_graph_random(
          feature_size=n_feat, n_nodes=6, n_isolates=2, n_edges=10
      )
  
      unsupervisedSamples = UnsupervisedSampler(G, nodes=G.nodes())
  
      gen = GraphSAGELinkGenerator(
          G, batch_size=n_batch, num_samples=n_samples
      ).flow(unsupervisedSamples)
  
      # The flow method is not passed UnsupervisedSampler object or a list of samples is not passed
      with pytest.raises(KeyError):
          gen = GraphSAGELinkGenerator(
              G, batch_size=n_batch, num_samples=n_samples
          ).flow("not_a_list_of_samples_or_a_sample_generator")
  
      # The flow method is not passed nothing
      with pytest.raises(TypeError):
          gen = GraphSAGELinkGenerator(
              G, batch_size=n_batch, num_samples=n_samples
          ).flow()
  
imports: import numpy
  import networkx
  import pytest
  import random
  from stellargraph.mapper import *
  from stellargraph.core.graph import *
  from stellargraph.data.unsupervised_sampler import *
  from ..test_utils.graphs import example_graph, example_graph_random, example_hin_1, repeated_features, weighted_tree
  from ..None import test_utils
label_desc: Use image node_id 9 for calling the Test_GraphSAGELinkGenerator obj's underlying member method code with example usage: obj.test_GraphSAGELinkGenerator_unsupervisedSampler_flow() without return types