summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2017-09-03 21:52:20 (GMT)
committerGitHub <noreply@github.com>2017-09-03 21:52:20 (GMT)
commit7d8282d25d4900dd3367daf28bb393be7f276729 (patch)
tree383ae254bfd9d6290ff0f7779cf4dd8fed20b6bb /Lib/test
parent31b8efeaa893e95358b71eb2b8365552d3966b4a (diff)
downloadcpython-7d8282d25d4900dd3367daf28bb393be7f276729.zip
cpython-7d8282d25d4900dd3367daf28bb393be7f276729.tar.gz
cpython-7d8282d25d4900dd3367daf28bb393be7f276729.tar.bz2
[3.6] bpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (GH-2315) (#3276)
bpo-29212: Fix the ugly ThreadPoolExecutor thread name. Fixes the newly introduced ugly default thread name for concurrent.futures thread.ThreadPoolExecutor threads. They'll now resemble the old <=3.5 threading default Thread-x names by being named ThreadPoolExecutor-y_n.. (cherry picked from commit a3d91b43c2851312fb942f31afa12f5961706db6)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_concurrent_futures.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index 9b61cc0..03f8d1d 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -191,10 +191,9 @@ class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, BaseTestCase
del executor
for t in threads:
- # We don't particularly care what the default name is, just that
- # it has a default name implying that it is a ThreadPoolExecutor
- # followed by what looks like a thread number.
- self.assertRegex(t.name, r'^.*ThreadPoolExecutor.*_[0-4]$')
+ # Ensure that our default name is reasonably sane and unique when
+ # no thread_name_prefix was supplied.
+ self.assertRegex(t.name, r'ThreadPoolExecutor-\d+_[0-4]$')
t.join()