Searched refs:NumToPercent (Results 1 – 3 of 3) sorted by relevance
/system/update_engine/scripts/update_payload/ |
D | format_utils_unittest.py | 33 self.assertEqual(format_utils.NumToPercent(1, 1), '100%') 36 self.assertEqual(format_utils.NumToPercent(5, 2), '250%') 39 self.assertEqual(format_utils.NumToPercent(3, 10), '30%') 42 self.assertEqual(format_utils.NumToPercent(3, 9), '33.3%') 43 self.assertEqual(format_utils.NumToPercent(3, 900), '0.3%') 46 self.assertEqual(format_utils.NumToPercent(3, 9000000), '0.00003%') 47 self.assertEqual(format_utils.NumToPercent(3, 90000000), '0%') 50 self.assertEqual(format_utils.NumToPercent(3, 9, min_precision=3), 52 self.assertEqual(format_utils.NumToPercent(3, 9, min_precision=0), 56 self.assertEqual(format_utils.NumToPercent(3, 900, max_precision=1), [all …]
|
D | format_utils.py | 22 def NumToPercent(num, total, min_precision=1, max_precision=5): function
|
D | histogram.py | 123 percent_str = format_utils.NumToPercent(count, self.total)
|