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
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user