summaryrefslogtreecommitdiff
path: root/test/timer_calib.py
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-07-14 14:19:14 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-26 19:43:40 +0000
commitf37d95b3edc6ff7bbda96fe7a4147273db66c306 (patch)
treeaaf408cfa525efce460cddb4153101b1db492109 /test/timer_calib.py
parent160af3cb3634f645ef0ca1a3c312c68cc3316869 (diff)
downloadchrome-ec-f37d95b3edc6ff7bbda96fe7a4147273db66c306.tar.gz
ec: Switch black to 80 cols and reformat files
Add pyproject.toml config file to set black to 80 columns. Remove column length overrides from other config files. Reformat python files to 80 cols. BRANCH=None BUG=b:238434058 TEST=presubmit/CQ Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I870a68f1bb751f4bad97024045f6e3075489e80f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3764071 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'test/timer_calib.py')
-rw-r--r--test/timer_calib.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/timer_calib.py b/test/timer_calib.py
index c7ac9fc23b..0de0d6b4e7 100644
--- a/test/timer_calib.py
+++ b/test/timer_calib.py
@@ -10,21 +10,23 @@ import time
def one_pass(helper):
helper.wait_output("=== Timer calibration ===")
- res = helper.wait_output("back-to-back get_time : (?P<lat>[0-9]+) us", use_re=True)[
- "lat"
- ]
+ res = helper.wait_output(
+ "back-to-back get_time : (?P<lat>[0-9]+) us", use_re=True
+ )["lat"]
minlat = int(res)
helper.trace("get_time latency %d us\n" % minlat)
helper.wait_output("sleep 1s")
t0 = time.time()
- second = helper.wait_output("done. delay = (?P<second>[0-9]+) us", use_re=True)[
- "second"
- ]
+ second = helper.wait_output(
+ "done. delay = (?P<second>[0-9]+) us", use_re=True
+ )["second"]
t1 = time.time()
secondreal = t1 - t0
secondlat = int(second) - 1000000
- helper.trace("1s timer latency %d us / real time %f s\n" % (secondlat, secondreal))
+ helper.trace(
+ "1s timer latency %d us / real time %f s\n" % (secondlat, secondreal)
+ )
us = {}
for pow2 in range(7):