- def test_graph(self):
- class MySink(bt2._UserSinkComponent):
- def __init__(comp_self, params):
- nonlocal graph
- self.assertEqual(comp_self.graph, graph)
-
- def _consume(self):
- pass
-
- graph = bt2.Graph()
- comp = graph.add_component(MySink, 'lel')
- del graph
-