class_docstr: Unit tests for :func:`networkx.generators.interval_graph.interval_graph`
docstr: this test is to see that an interval supports infinite number
docstr_tok: ["this","test","is","to","see","that","an","interval","supports","infinite","number"]
code: def test_interval_graph_5(self):
      """this test is to see that an interval supports infinite number"""
      intervals = {
          (-math.inf, 0),
          (-1, -1),
          (0.5, 0.5),
          (1, 1),
          (1, math.inf),
      }
  
      expected_graph = nx.Graph()
      expected_graph.add_nodes_from(intervals)
      e1 = ((-math.inf, 0), (-1, -1))
      e2 = ((1, 1), (1, math.inf))
  
      expected_graph.add_edges_from([e1, e2])
      actual_g = interval_graph(intervals)
  
      assert set(actual_g.nodes) == set(expected_graph.nodes)
      assert edges_equal(expected_graph, actual_g)
  
file_path: networkx/networkx/generators/tests/test_interval_graph.py
imports: import math
  import pytest
  import networkx
  from networkx.generators.interval_graph import interval_graph
  from networkx.utils import edges_equal
label_desc: Use image node_id 8 for calling the TestIntervalGraph obj's underlying member method code with example usage: obj.test_interval_graph_5() without return types