class_docstr: Unit tests for the :func:`performance` function.
docstr: Tests that a good partition has a high performance measure.
docstr_tok: ["Tests","that","a","good","partition","has","a","high","performance","measure","."]
code: def test_good_partition(self):
      """Tests that a good partition has a high performance measure."""
      G = barbell_graph(3, 0)
      partition = [{0, 1, 2}, {3, 4, 5}]
      assert 14 / 15 == pytest.approx(
          partition_quality(G, partition)[1], abs=1e-7
      )
  
file_path: networkx/networkx/algorithms/community/tests/test_quality.py
imports: import pytest
  import networkx
  from networkx import barbell_graph
  from networkx.algorithms.community import modularity, partition_quality
  from networkx.algorithms.community.quality import inter_community_edges
label_desc: Use image node_id 2 for calling the TestPerformance obj's underlying member method code with example usage: obj.test_good_partition() without return types