MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_module_names

Method get_module_names

Lib/test/_test_multiprocessing.py:4880–4889  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4878class _TestImportStar(unittest.TestCase):
4879
4880 def get_module_names(self):
4881 import glob
4882 folder = os.path.dirname(multiprocessing.__file__)
4883 pattern = os.path.join(glob.escape(folder), '*.py')
4884 files = glob.glob(pattern)
4885 modules = [os.path.splitext(os.path.split(f)[1])[0] for f in files]
4886 modules = ['multiprocessing.' + m for m in modules]
4887 modules.remove('multiprocessing.__init__')
4888 modules.append('multiprocessing')
4889 return modules
4890
4891 def test_import(self):
4892 modules = self.get_module_names()

Callers 1

test_importMethod · 0.95

Calls 7

escapeMethod · 0.80
splitextMethod · 0.80
joinMethod · 0.45
globMethod · 0.45
splitMethod · 0.45
removeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected