def test_parallel_with_gen_not_none(self):
    """Test of the parallel ccmbinator with a not none generator."""
    dataset1 = lambda _: (i for i in range(10))
    dataset2 = lambda _: (i for i in range(10, 20))
    parallel = data.Parallel([dataset1, dataset2])

    def test_generator():
      yield 0

    generator = parallel(gen=test_generator)

    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), 12)
Test of the parallel ccmbinator with a not none generator.
trax/data/inputs_test.py