diff options
author | Zuul <zuul@review.openstack.org> | 2017-10-24 04:05:38 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-10-24 04:05:38 +0000 |
commit | 8152977deba1126f651d1223bd54f685d4cf4616 (patch) | |
tree | 1f8c5559e3fd4391311af38ff7a638f7191f3fdf | |
parent | 0cb0796f8b15e9834c06cbc326c372f2394d5d35 (diff) | |
parent | f8fc2172af6aab963c85fb483eb03f086cc0e892 (diff) | |
download | ceilometer-8152977deba1126f651d1223bd54f685d4cf4616.tar.gz |
Merge "fix cpu_util precision is too precise" into stable/ocata
-rw-r--r-- | ceilometer/tests/unit/pipeline_base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ceilometer/tests/unit/pipeline_base.py b/ceilometer/tests/unit/pipeline_base.py index 979e594d..9d069241 100644 --- a/ceilometer/tests/unit/pipeline_base.py +++ b/ceilometer/tests/unit/pipeline_base.py @@ -1157,7 +1157,7 @@ class BasePipelineTestCase(base.BaseTestCase): self.assertEqual(1, len(publisher.samples)) cpu_util_sample = publisher.samples[0] - self.assertEqual(100, cpu_util_sample.volume) + self.assertAlmostEqual(100.0, cpu_util_sample.volume) def test_rate_of_change_max(self): s = "100.0 / (10**9 * (resource_metadata.cpu_number or 1))" @@ -1215,7 +1215,7 @@ class BasePipelineTestCase(base.BaseTestCase): self.assertEqual(1, len(publisher.samples)) cpu_util_sample = publisher.samples[0] - self.assertEqual(100, cpu_util_sample.volume) + self.assertAlmostEqual(100.0, cpu_util_sample.volume) @mock.patch('ceilometer.transformer.conversions.LOG') def test_rate_of_change_out_of_order(self, the_log): @@ -1286,7 +1286,7 @@ class BasePipelineTestCase(base.BaseTestCase): self.assertEqual(1, len(publisher.samples)) cpu_util_sample = publisher.samples[0] - self.assertEqual(12.5, cpu_util_sample.volume) + self.assertAlmostEqual(12.5, cpu_util_sample.volume) the_log.warning.assert_called_with( 'dropping out of time order sample: %s', (counters[1],) |