Skip to content

Commit c055468

Browse files
committed
Fix test on non-supported platform
1 parent 1163b4d commit c055468

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_concurrent_futures/test_interpreter_pool.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _thread
12
import asyncio
23
import contextlib
34
import io
@@ -502,6 +503,8 @@ def test_thread_name_prefix(self):
502503
self.assertStartsWith(self.executor._thread_name_prefix,
503504
"InterpreterPoolExecutor-")
504505

506+
@unittest.skipUnless(hasattr(_thread, '_get_name'), "missing _thread._get_name")
507+
def test_thread_name_prefix_with_thread_get_name(self):
505508
def f():
506509
import _thread
507510
return _thread._get_name()

0 commit comments

Comments
 (0)