Skip to content

Commit affe63e

Browse files
committed
Fix test on Linux
1 parent c055468 commit affe63e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/test/test_concurrent_futures/test_interpreter_pool.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,10 @@ def f():
509509
import _thread
510510
return _thread._get_name()
511511

512+
# Some platforms (Linux) are using 16 bytes to store the thread name,
513+
# so only compare the first 15 bytes (without the trailing \n).
512514
self.assertStartsWith(self.executor.submit(f).result(),
513-
"InterpreterPoolExecutor-")
514-
515+
"InterpreterPoolExecutor-"[:15])
515516

516517
class AsyncioTest(InterpretersMixin, testasyncio_utils.TestCase):
517518

0 commit comments

Comments
 (0)