summaryrefslogtreecommitdiff
path: root/Lib/test/test_concurrent_futures.py
diff options
context:
space:
mode:
authorBrian Quinlan <brian@sweetapp.com>2011-04-08 08:19:33 +1000
committerBrian Quinlan <brian@sweetapp.com>2011-04-08 08:19:33 +1000
commitf007876bd64def2829a242e0cf5adfd3ef25c4be (patch)
tree1ec073f7cf806fa500a9146363e56686f90497aa /Lib/test/test_concurrent_futures.py
parent0df80926c93ac71b032fffa215cf7b2f831d81b6 (diff)
downloadcpython-git-f007876bd64def2829a242e0cf5adfd3ef25c4be.tar.gz
Issue #11777: Executor.map does not submit futures until iter.next() is called
Diffstat (limited to 'Lib/test/test_concurrent_futures.py')
-rw-r--r--Lib/test/test_concurrent_futures.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index 2662af76cf..ec84a66307 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -369,7 +369,15 @@ class ExecutorTest(unittest.TestCase):
class ThreadPoolExecutorTest(ThreadPoolMixin, ExecutorTest):
- pass
+ def test_map_submits_without_iteration(self):
+ """Tests verifying issue 11777."""
+ finished = []
+ def record_finished(n):
+ finished.append(n)
+
+ self.executor.map(record_finished, range(10))
+ self.executor.shutdown(wait=True)
+ self.assertCountEqual(finished, range(10))
class ProcessPoolExecutorTest(ProcessPoolMixin, ExecutorTest):