class_docstr: Base class for test classes for minimum spanning tree algorithms.
  This class contains some common tests that will be inherited by
  subclasses. Each subclass must have a class attribute
  :data:`algorithm` that is a string representing the algorithm to
  run, as described under the ``algorithm`` keyword argument for the
  :func:`networkx.minimum_spanning_edges` function.  Subclasses can
  then implement any algorithm-specific tests.
class_docstr_tok: ["Base","class","for","test","classes","for","minimum","spanning","tree","algorithms",".","This","class","contains","some","common","tests","that","will","be","inherited","by","subclasses",".","Each","subclass","must","have","a","class","attribute",":","data",":","`","algorithm","`","that","is","a","string","representing","the","algorithm","to","run",",","as","described","under","the","``","algorithm","``","keyword","argument","for","the",":","func",":","`","networkx.minimum_spanning_edges","`","function",".","Subclasses","can","then","implement","any","algorithm-specific","tests","."]
docstr: Creates an example graph and stores the expected minimum and
  maximum spanning tree edges.
docstr_tok: ["Creates","an","example","graph","and","stores","the","expected","minimum","and","maximum","spanning","tree","edges","."]
code: def setup_method(self, method):
      """Creates an example graph and stores the expected minimum and
      maximum spanning tree edges.
      """
      # This stores the class attribute `algorithm` in an instance attribute.
      self.algo = self.algorithm
      # This example graph comes from Wikipedia:
      # https://en.wikipedia.org/wiki/Kruskal's_algorithm
      edges = [
          (0, 1, 7),
          (0, 3, 5),
          (1, 2, 8),
          (1, 3, 9),
          (1, 4, 7),
          (2, 4, 5),
          (3, 4, 15),
          (3, 5, 6),
          (4, 5, 8),
          (4, 6, 9),
          (5, 6, 11),
      ]
      self.G = nx.Graph()
      self.G.add_weighted_edges_from(edges)
      self.minimum_spanning_edgelist = [
          (0, 1, {"weight": 7}),
          (0, 3, {"weight": 5}),
          (1, 4, {"weight": 7}),
          (2, 4, {"weight": 5}),
          (3, 5, {"weight": 6}),
          (4, 6, {"weight": 9}),
      ]
      self.maximum_spanning_edgelist = [
          (0, 1, {"weight": 7}),
          (1, 2, {"weight": 8}),
          (1, 3, {"weight": 9}),
          (3, 4, {"weight": 15}),
          (4, 6, {"weight": 9}),
          (5, 6, {"weight": 11}),
      ]
  
imports: import pytest
  import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 1 for calling the MinimumSpanningTreeTestBase obj's underlying member method code with example usage: obj.setup_method(method) without return types