Пример #1
0
 def test_scheduler_early_exhaustion(self):
     procs = 2
     streams = [["%s_a" % n, "%s_b" % n] for n in range(procs)]
     for events in intermerge(*streams):
         result = timelimited(2, self.scheduler_basic, procs, events[:len(events)/2])
         self.assertEqual(events[:len(events)/2], result[:len(events)/2])
         self.assertEqual(sorted(events), sorted(result))
Пример #2
0
 def test_scheduler_example(self):
     procs = 2
     streams = [["%s_a" % n, "%s_b" % n] for n in range(procs)]
     for events in intermerge(*streams):
         result = timelimited(2, self.scheduler_basic, procs, events)
         self.assertEqual(events, result)