

@ddt.data([[3.1, 4.2, 3.6, 4.5, 2.8, 3.3, 4.1, 3.8, 4.3, 2.9, 10.2], [3.1, 4.2, 3.6, 4.5, 2.8, 3.3, 20.1, 3.8, 4.3, 2.9, 24.2], [3.1, 4.2, 3.6, 4.5, 2.8, 3.3, 4.1, 30.8, 4.3, 49.9, 69.2]])
def test_merge(self, durations):
    single_sla = outliers.Outliers({
        'max': 1,
    })
    for dd in durations:
        for d in dd:
            single_sla.add_iteration({
                'duration': d,
            })
    slas = [outliers.Outliers({
        'max': 1,
    }) for _ in durations]
    for (idx, sla) in enumerate(slas):
        for duration in durations[idx]:
            sla.add_iteration({
                'duration': duration,
            })
    merged_sla = slas[0]
    for sla in slas[1:]:
        merged_sla.merge(sla)
    self.assertEqual(single_sla.success, merged_sla.success)
    self.assertEqual(single_sla.iterations, merged_sla.iterations)
    self.assertEqual(single_sla.outliers, merged_sla.outliers)

dataset/ETHPy150Open openstack/rally/tests/unit/plugins/common/sla/test_ouliers.py OutliersTestCase.test_merge/original