def test_mixture_of_mixtures_dupe(self):
    self.add_task('task2_a', self.function_source)
    self.add_task('task2_b', self.function_source)
    self.add_task('task2_c', self.function_source)
    MixtureRegistry.add('yet_another_mix', [('task2_a', 1), ('task2_b', 1)])
    MixtureRegistry.add('supermix_with_dupe', [('yet_another_mix', 1), ('task2_a', 1), ('task2_c', 1)])
    supermix = MixtureRegistry.get('supermix_with_dupe')
    names = [task.name for task in supermix.tasks]
    self.assertEqual(names, ['task2_a', 'task2_b', 'task2_c'])
    self.assertEqual([supermix.get_rate(t) for t in supermix.tasks], [1.5, 0.5, 1])
def test_mixture_of_mixtures_dupe(self):
    self.add_task('task2_a', self.function_source)
    self.add_task('task2_b', self.function_source)
    self.add_task('task2_c', self.function_source)
    MixtureRegistry.add('yet_another_mix', [('task2_a', 1), ('task2_b', 1)])
    MixtureRegistry.add('supermix_with_dupe', [('yet_another_mix', 1), ('task2_a', 1), ('task2_c', 1)])
    supermix = MixtureRegistry.get('supermix_with_dupe')
    names = [task.name for task in supermix.tasks]
    self.assertEqual(names, ['task2_a', 'task2_b', 'task2_c'])
    self.assertEqual([supermix.get_rate(t) for t in supermix.tasks], [1.5, 0.5, 1])