class_docstr: Tests of Attri2VecLinkGenerator class
code: def test_LinkMapper_constructor(self):
      G = example_graph(feature_size=self.n_feat)
      edge_labels = [0] * G.number_of_edges()
  
      generator = Attri2VecLinkGenerator(G, batch_size=self.batch_size)
      mapper = generator.flow(G.edges(), edge_labels)
      assert generator.batch_size == self.batch_size
      assert mapper.data_size == G.number_of_edges()
      assert len(mapper.ids) == G.number_of_edges()
  
      G = example_graph(feature_size=self.n_feat, is_directed=True)
      edge_labels = [0] * G.number_of_edges()
      generator = Attri2VecLinkGenerator(G, batch_size=self.batch_size)
      mapper = generator.flow(G.edges(), edge_labels)
      assert generator.batch_size == self.batch_size
      assert mapper.data_size == G.number_of_edges()
      assert len(mapper.ids) == G.number_of_edges()
  
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 1 for calling the Test_Attri2VecLinkGenerator obj's underlying member method code with example usage: obj.test_LinkMapper_constructor() without return types