def test_merge(self):
    spec = merge([uniform(), uniform()], (lambda x, y: (x + y)))
    parsed = ParsedSpec(spec)
    self.assertEqual(parsed.size(), 2)
    self.assertEqual(0.5, parsed.instantiate([0.0, 0.5]))
    self.assertEqual(1.5, parsed.instantiate([0.5, 1.0]))
    self.assertEqual(2.0, parsed.instantiate([1.0, 1.0]))
def test_merge(self):
    spec = merge([uniform(), uniform()], (lambda x, y: (x + y)))
    parsed = ParsedSpec(spec)
    self.assertEqual(parsed.size(), 2)
    self.assertEqual(0.5, parsed.instantiate([0.0, 0.5]))
    self.assertEqual(1.5, parsed.instantiate([0.5, 1.0]))
    self.assertEqual(2.0, parsed.instantiate([1.0, 1.0]))