mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-96125: Fix sys.thread_info.name on pthread platforms (GH-96126) (#96128)
Automerge-Triggered-By: GH:tiran
(cherry picked from commit 822955c166
)
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
58e1fe24c7
commit
27f390bc30
3 changed files with 11 additions and 1 deletions
|
@ -628,6 +628,14 @@ class SysModuleTest(unittest.TestCase):
|
|||
self.assertEqual(len(info), 3)
|
||||
self.assertIn(info.name, ('nt', 'pthread', 'pthread-stubs', 'solaris', None))
|
||||
self.assertIn(info.lock, ('semaphore', 'mutex+cond', None))
|
||||
if sys.platform.startswith(("linux", "freebsd")):
|
||||
self.assertEqual(info.name, "pthread")
|
||||
elif sys.platform == "win32":
|
||||
self.assertEqual(info.name, "nt")
|
||||
elif sys.platform == "emscripten":
|
||||
self.assertIn(info.name, {"pthread", "pthread-stubs"})
|
||||
elif sys.platform == "wasi":
|
||||
self.assertEqual(info.name, "pthread-stubs")
|
||||
|
||||
@unittest.skipUnless(support.is_emscripten, "only available on Emscripten")
|
||||
def test_emscripten_info(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue