From 1435d102be858f28a07c89aaf55fe3d76694ef31 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 20 Dec 2019 18:04:49 +0000 Subject: [PATCH] refix py2 tests --- tqdm/tests/tests_synchronisation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tqdm/tests/tests_synchronisation.py b/tqdm/tests/tests_synchronisation.py index 0e797611..34f682a5 100644 --- a/tqdm/tests/tests_synchronisation.py +++ b/tqdm/tests/tests_synchronisation.py @@ -203,5 +203,11 @@ def test_threadpool(): tqdm.set_lock(RLock()) with ThreadPoolExecutor(8) as pool: - res = list(tqdm(pool.map(incr_bar, range(100)), disable=True)) + try: + res = list(tqdm(pool.map(incr_bar, range(100)), disable=True)) + except AttributeError: + if sys.version_info < (3,): + raise SkipTest + else: + raise assert sum(res) == sum(range(1, 101))