mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-42955: Add sys.modules_names (GH-24238)
Add sys.module_names, containing the list of the standard library module names.
This commit is contained in:
parent
879986d8a9
commit
db584bdad3
10 changed files with 305 additions and 275 deletions
|
@ -986,6 +986,11 @@ class SysModuleTest(unittest.TestCase):
|
|||
self.assertEqual(proc.stdout.rstrip().splitlines(), expected,
|
||||
proc)
|
||||
|
||||
def test_module_names(self):
|
||||
self.assertIsInstance(sys.module_names, frozenset)
|
||||
for name in sys.module_names:
|
||||
self.assertIsInstance(name, str)
|
||||
|
||||
|
||||
@test.support.cpython_only
|
||||
class UnraisableHookTest(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue