From ce87356c6589d9cad37fd45fcc94e17ba79c381b Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Fri, 10 Jan 2014 02:01:46 +0100 Subject: [PATCH] Python 3: fix test_sample_list Change the counter_volume field of "fake" samples to get compatibility with both Python 2 and 3. In Python 2: >>> print(str(0.261666666666667)) 0.261666666667 In Python 3: >>> print(str(0.261666666666667)) 0.261666666666667 Change-Id: I4beed7aff7e89f891024975b9df9208c987dc87c --- ceilometerclient/tests/v2/test_shell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ceilometerclient/tests/v2/test_shell.py b/ceilometerclient/tests/v2/test_shell.py index 3b24b29..e2fb449 100644 --- a/ceilometerclient/tests/v2/test_shell.py +++ b/ceilometerclient/tests/v2/test_shell.py @@ -239,19 +239,19 @@ class ShellSampleListCommandTest(utils.BaseTestCase): "resource_id": "5dcf5537-3161-4e25-9235-407e1385bd35", "timestamp": "2013-10-15T05:50:30", "counter_unit": "%", - "counter_volume": 0.261666666666667, + "counter_volume": 0.261666666667, "counter_type": "gauge"}, {"counter_name": "cpu_util", "resource_id": "87d197e9-9cf6-4c25-bc66-1b1f4cedb52f", "timestamp": "2013-10-15T05:50:29", "counter_unit": "%", - "counter_volume": 0.261666666666667, + "counter_volume": 0.261666666667, "counter_type": "gauge"}, {"counter_name": "cpu_util", "resource_id": "5dcf5537-3161-4e25-9235-407e1385bd35", "timestamp": "2013-10-15T05:40:30", "counter_unit": "%", - "counter_volume": 0.251247920133111, + "counter_volume": 0.251247920133, "counter_type": "gauge"}, {"counter_name": "cpu_util", "resource_id": "87d197e9-9cf6-4c25-bc66-1b1f4cedb52f",