def test_parallel_with_weights(self):
    """Test of the parallel ccmbinator with weights."""
    dataset1 = lambda: (i for i in range(10))
    dataset2 = lambda: (i for i in range(10, 20))
    parallel = data.Parallel([dataset1, dataset2], counters=(2, 1))
    generator = parallel()

    self.assertEqual(next(generator), 0)
    self.assertEqual(next(generator), 10)
    self.assertEqual(next(generator), 1)
    self.assertEqual(next(generator), 11)
    self.assertEqual(next(generator), 2)
    self.assertEqual(next(generator), 3)
    self.assertEqual(next(generator), 12)
    self.assertEqual(next(generator), 4)
    self.assertEqual(next(generator), 5)
    self.assertEqual(next(generator), 13)
Test of the parallel ccmbinator with weights.
trax/data/inputs_test.py