Changeset: c75ed993bccf for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c75ed993bccf
Modified Files:
        testing/Mtest.py.in
Branch: Dec2025
Log Message:

Fix up progress layout.


diffs (19 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3020,11 +3020,12 @@ def progress(count, total, test, spaces=
             threadids[tid] = len(threadids)
             nl = '\n'
         line = len(threadids) - threadids[tid] - 1
-    perc = round((count/total) * 100) if total and count else 0
-    s = f'[{count}/{total}] ({perc}%)    {test}'
+    perc = int(count*100/total) if total and count else 0
+    width = len(str(total))
+    s = f'[{count:{width}}/{total}] ({perc:2}%)    {test}'
     if len(s) > ttywidth:
         test = test[len(s)-ttywidth:]
-        s = f'[{count}/{total}] ({perc}%)    {test}'
+        s = f'[{count:{width}}/{total}] ({perc:2}%)    {test}'
     sys.stdout.write(nl + '\r' + up*line + spaces + '\r' + s + down*line)
 
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to