mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #11223: Replace threading._info() by sys.thread_info
This commit is contained in:
parent
fab6c70770
commit
d5c355ccc7
13 changed files with 119 additions and 108 deletions
|
|
@ -474,6 +474,14 @@ class SysModuleTest(unittest.TestCase):
|
|||
if not sys.platform.startswith('win'):
|
||||
self.assertIsInstance(sys.abiflags, str)
|
||||
|
||||
@unittest.skipUnless(hasattr(sys, 'thread_info'),
|
||||
'Threading required for this test.')
|
||||
def test_thread_info(self):
|
||||
info = sys.thread_info
|
||||
self.assertTrue(len(info), 3)
|
||||
self.assertIn(info.name, ('nt', 'os2', 'pthread', 'solaris', None))
|
||||
self.assertIn(info.lock, ('semaphore', 'mutex+cond', None))
|
||||
|
||||
def test_43581(self):
|
||||
# Can't use sys.stdout, as this is a StringIO object when
|
||||
# the test runs under regrtest.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue