Searched refs:NumToPercent (Results 1 – 3 of 3) sorted by relevance
/system/update_engine/scripts/update_payload/ |
D | format_utils_unittest.py | 28 self.assertEqual(format_utils.NumToPercent(1, 1), '100%') 31 self.assertEqual(format_utils.NumToPercent(5, 2), '250%') 34 self.assertEqual(format_utils.NumToPercent(3, 10), '30%') 37 self.assertEqual(format_utils.NumToPercent(3, 9), '33.3%') 38 self.assertEqual(format_utils.NumToPercent(3, 900), '0.3%') 41 self.assertEqual(format_utils.NumToPercent(3, 9000000), '0.00003%') 42 self.assertEqual(format_utils.NumToPercent(3, 90000000), '0%') 45 self.assertEqual(format_utils.NumToPercent(3, 9, min_precision=3), 47 self.assertEqual(format_utils.NumToPercent(3, 9, min_precision=0), 51 self.assertEqual(format_utils.NumToPercent(3, 900, max_precision=1), [all …]
|
D | format_utils.py | 20 def NumToPercent(num, total, min_precision=1, max_precision=5): function
|
D | histogram.py | 120 percent_str = format_utils.NumToPercent(count, self.total)
|