From c364c05b67d49ab204ba2a7e8f58636c1608add4 Mon Sep 17 00:00:00 2001 From: wuzewu Date: Wed, 4 Sep 2019 19:17:13 +0800 Subject: [PATCH] Fix progress issue --- test/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_utils.py b/test/test_utils.py index 754c7cc1..304003d8 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -68,7 +68,7 @@ def _download_file(url, savepath, print_progress): if print_progress: done = int(50 * dl / total_length) progress("[%-50s] %.2f%%" % - ('=' * done, float(dl / total_length * 100))) + ('=' * done, float(100 * dl) / total_length)) if print_progress: progress("[%-50s] %.2f%%" % ('=' * 50, 100), end=True) @@ -88,7 +88,7 @@ def _uncompress_file(filepath, extrapath, delete_file, print_progress): if print_progress: done = int(50 * float(index) / total_num) progress( - "[%-50s] %.2f%%" % ('=' * done, float(index / total_num * 100))) + "[%-50s] %.2f%%" % ('=' * done, float(100 * index) / total_num)) if print_progress: progress("[%-50s] %.2f%%" % ('=' * 50, 100), end=True) -- GitLab