diff --git a/tests/test_progress.py b/tests/test_progress.py index 8b2b672..9ae5026 100644 --- a/tests/test_progress.py +++ b/tests/test_progress.py @@ -23,26 +23,31 @@ def test_downloaded(): assert progress.progress_perc == 0 progress.advance(1, 100) + progress._recalculate() assert progress.downloaded == 100 assert progress.progress_bytes == 100 assert progress.progress_perc == 11 progress.advance(2, 200) + progress._recalculate() assert progress.downloaded == 300 assert progress.progress_bytes == 300 assert progress.progress_perc == 33 progress.advance(3, 150) + progress._recalculate() assert progress.downloaded == 450 assert progress.progress_bytes == 450 assert progress.progress_perc == 50 progress.advance(1, 50) + progress._recalculate() assert progress.downloaded == 500 assert progress.progress_bytes == 500 assert progress.progress_perc == 55 progress.abort(2) + progress._recalculate() assert progress.downloaded == 500 assert progress.progress_bytes == 300 assert progress.progress_perc == 33 @@ -52,6 +57,7 @@ def test_downloaded(): progress.advance(1, 150) progress.advance(2, 300) progress.advance(3, 150) + progress._recalculate() assert progress.downloaded == 1100 assert progress.progress_bytes == 900 @@ -71,12 +77,15 @@ def test_estimated_total(): assert progress.estimated_total is None progress.start(1, 12000) + progress._recalculate() assert progress.estimated_total == 12000 * 3 progress.start(2, 11000) + progress._recalculate() assert progress.estimated_total == 11500 * 3 progress.start(3, 10000) + progress._recalculate() assert progress.estimated_total == 11000 * 3