Skip to content

Commit c0a7f60

Browse files
Issue 481: Output uptake message with 3 decimals (#482)
1 parent 006e1b0 commit c0a7f60

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pollbot/tasks/telemetry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def main_summary_uptake(product, version):
9393
status = Status.INCOMPLETE
9494
else:
9595
status = Status.EXISTS
96-
message = 'Telemetry uptake for version {} is {:.1f}%'.format(
96+
message = 'Telemetry uptake for version {} is {:.3f}%'.format(
9797
version_name, ratio * 100)
9898

9999
return build_task_response(status, url, message)

tests/test_tasks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ async def test_telemetry_uptake_tasks_incomplete(self):
10851085
received = await telemetry.main_summary_uptake('firefox', '57.0a1')
10861086
assert received["status"] == Status.INCOMPLETE.value
10871087
assert received["message"] == ("Telemetry uptake for version 57.0a1 "
1088-
"({}) is 0.0%".format(build_id))
1088+
"({}) is 0.000%".format(build_id))
10891089

10901090
async def test_telemetry_uptake_tasks_exists(self):
10911091
build_id = "{}192146".format(yesterday(formating='%Y%m%d'))
@@ -1128,4 +1128,4 @@ async def test_telemetry_uptake_tasks_exists(self):
11281128
received = await telemetry.main_summary_uptake('firefox', '57.0a1')
11291129
assert received["status"] == Status.EXISTS.value
11301130
assert received["message"] == ("Telemetry uptake for version 57.0a1 "
1131-
"({}) is 55.0%".format(build_id))
1131+
"({}) is 55.001%".format(build_id))

0 commit comments

Comments
 (0)