+ def test_iter_specs_not_list(self):
+ spec = bt2.ComponentSpec('ctf', 'fs', _3EVENTS_INTERSECT_TRACE_PATH)
+ notif_iter = bt2.TraceCollectionNotificationIterator(spec,
+ notification_types=[bt2.EventNotification])
+ self.assertEqual(len(list(notif_iter)), 8)
+
+ def test_iter_custom_filter(self):
+ src_spec = bt2.ComponentSpec('ctf', 'fs', _3EVENTS_INTERSECT_TRACE_PATH)
+ flt_spec = bt2.ComponentSpec('utils', 'trimmer', {
+ 'end': 13515309000000075,
+ })
+ notif_iter = bt2.TraceCollectionNotificationIterator(src_spec, flt_spec,
+ notification_types=[bt2.EventNotification])
+ self.assertEqual(len(list(notif_iter)), 5)
+