From a663f9647d25a5322af8a34bdb3757e0a8647253 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sun, 8 Apr 2018 22:06:19 +0100 Subject: [PATCH] harder tests --- tqdm/tests/tests_tqdm.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tqdm/tests/tests_tqdm.py b/tqdm/tests/tests_tqdm.py index 028595c8..8302523c 100644 --- a/tqdm/tests/tests_tqdm.py +++ b/tqdm/tests/tests_tqdm.py @@ -1470,9 +1470,16 @@ def test_postfix_list(): bar_format="{postfix[0]} {postfix[1]:>5.2f}", postfix=["foo", 42]) as t: for i in range(10): - t.postfix = ["bar", i] + if i % 2: + t.postfix[0] = "abcdefghij"[i] + else: + t.postfix[1] = i t.update() - assert "bar 9.00" in our_file.getvalue() + res = our_file.getvalue() + assert "f 6.00" in res + assert "h 6.00" in res + assert "h 8.00" in res + assert "j 8.00" in res class DummyTqdmFile(object):