mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781)
This commit is contained in:
parent
0daa99f68b
commit
9b5ca5405e
8 changed files with 279 additions and 139 deletions
|
@ -629,6 +629,14 @@ class SysModuleTest(unittest.TestCase):
|
|||
self.assertIn(info.name, ('nt', 'pthread', 'solaris', None))
|
||||
self.assertIn(info.lock, ('semaphore', 'mutex+cond', None))
|
||||
|
||||
@unittest.skipUnless(support.is_emscripten, "only available on Emscripten")
|
||||
def test_emscripten_info(self):
|
||||
self.assertEqual(len(sys._emscripten_info), 4)
|
||||
self.assertIsInstance(sys._emscripten_info.emscripten_version, tuple)
|
||||
self.assertIsInstance(sys._emscripten_info.runtime, (str, type(None)))
|
||||
self.assertIsInstance(sys._emscripten_info.pthreads, bool)
|
||||
self.assertIsInstance(sys._emscripten_info.shared_memory, bool)
|
||||
|
||||
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