code: def testListTriangles(self):
      g = Graph.Famous("petersen")
      self.assertEqual([], g.list_triangles())
  
      g = Graph(
          [(0, 1), (1, 2), (2, 0), (1, 3), (3, 2), (4, 2), (4, 3)]
      )
      observed = g.list_triangles()
      self.assertTrue(all(isinstance(x, tuple) for x in observed))
      observed = sorted(sorted(tri) for tri in observed)
      expected = [[0, 1, 2], [1, 2, 3], [2, 3, 4]]
      self.assertEqual(observed, expected)
  
      g = Graph.GRG(100, 0.2)
      tri = Graph.Full(3)
      observed = sorted(sorted(tri) for tri in g.list_triangles())
      expected = sorted(
          x for x in g.get_subisomorphisms_vf2(tri) if x == sorted(x)
      )
      self.assertEqual(observed, expected)
  
file_path: python-igraph/tests/test_motifs.py
imports: import unittest
  from igraph import Graph
label_desc: Use image node_id 1 for calling the TrianglesTests obj's underlying member method code with example usage: obj.testListTriangles() without return types