class_docstr: Tests for :func:`networkx.algorithms.min_edge_cover`
class_docstr_tok: ["Tests","for",":","func",":","`","networkx.algorithms.min_edge_cover","`"]
code: def test_bipartite_explicit(self):
      G = nx.Graph()
      G.add_nodes_from([1, 2, 3, 4], bipartite=0)
      G.add_nodes_from(["a", "b", "c"], bipartite=1)
      G.add_edges_from(
          [(1, "a"), (1, "b"), (2, "b"), (2, "c"), (3, "c"), (4, "a")]
      )
      # Use bipartite method by prescribing the algorithm
      min_cover = nx.min_edge_cover(
          G, nx.algorithms.bipartite.matching.eppstein_matching
      )
      assert nx.is_edge_cover(G, min_cover)
      assert len(min_cover) == 8
      # Use the default method which is not specialized for bipartite
      min_cover2 = nx.min_edge_cover(G)
      assert nx.is_edge_cover(G, min_cover2)
      assert len(min_cover2) == 4
  
file_path: networkx/networkx/algorithms/tests/test_covering.py
imports: import pytest
  import networkx
label_desc: Use image node_id 6 for calling the TestMinEdgeCover obj's underlying member method code with example usage: obj.test_bipartite_explicit() without return types