From 2f46d5468b7eaabfb23081669e6c1c2760a1bc16 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Mon, 3 Feb 2014 22:59:28 +1300 Subject: [PATCH] Test of format_meter (failed on py32) --- tests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests.py b/tests.py index bd45004a..220cfa9b 100644 --- a/tests.py +++ b/tests.py @@ -1,5 +1,5 @@ from __future__ import unicode_literals -from tqdm import format_interval +from tqdm import format_interval, format_meter def test_format_interval(): @@ -7,3 +7,9 @@ def test_format_interval(): assert format_interval(6160) == '1:42:40' assert format_interval(238113) == '66:08:33' + +def test_format_meter(): + assert format_meter(231, 1000, 392) == \ + "|##--------| 231/1000 23% [elapsed: " \ + "06:32 left: 12:49, 0.00 iters/sec]" +