Home
last modified time | relevance | path

Searched refs:mod_name (Results 1 – 25 of 47) sorted by relevance

12

/third_party/python/Lib/
Drunpy.py26 def __init__(self, mod_name): argument
27 self.mod_name = mod_name
28 self.module = types.ModuleType(mod_name)
32 mod_name = self.mod_name
34 self._saved_module.append(sys.modules[mod_name])
37 sys.modules[mod_name] = self.module
42 sys.modules[self.mod_name] = self._saved_module[0]
44 del sys.modules[self.mod_name]
64 mod_name=None, mod_spec=None, argument
79 run_globals.update(__name__ = mod_name,
[all …]
/third_party/python/Lib/test/
Dtest_runpy.py160 mod_name = "<Nonsense>"
164 mod_spec = importlib.machinery.ModuleSpec(mod_name,
169 "__name__": mod_name,
181 mod_name,
189 def expect_import_error(self, mod_name): argument
191 run_module(mod_name)
195 self.fail("Expected import error for " + mod_name)
247 mod_name = (pkg_name+".")*depth + mod_base
248 mod_spec = importlib.util.spec_from_file_location(mod_name,
250 return pkg_dir, mod_fname, mod_name, mod_spec
[all …]
Dtest_zipimport_support.py117 mod_name = mod.__name__.split(".")[-1]
118 mod_name = mod_name.replace("sample_", "sample_zipped_")
119 sample_sources[mod_name] = src
127 for mod_name, src in sample_sources.items():
128 z.writestr(mod_name + ".py", src)
Dtest_zipimport.py495 mod_name = module_path_to_dotted_name(mod_path)
496 mod = importlib.import_module(mod_name)
497 self.assertTrue(mod_name in sys.modules)
504 self.assertIsNone(loader.get_source(mod_name))
505 self.assertEqual(loader.get_filename(mod_name), mod.__file__)
610 mod_name = module_path_to_dotted_name(mod_path)
611 mod = importlib.import_module(mod_name)
612 self.assertTrue(mod_name in sys.modules)
619 self.assertIsNone(loader.get_source(mod_name))
620 self.assertEqual(loader.get_filename(mod_name), mod.__file__)
Dtest_profile.py43 mod_name = testfunc.__module__.rsplit('.', 1)[1]
47 output = [line.rstrip() for line in output if mod_name in line]
/third_party/ltp/include/
Dtst_module.h10 void tst_module_exists_(void (cleanup_fn)(void), const char *mod_name,
13 static inline void tst_module_exists(const char *mod_name, char **mod_path) in tst_module_exists() argument
15 tst_module_exists_(NULL, mod_name, mod_path); in tst_module_exists()
18 void tst_module_load_(void (cleanup_fn)(void), const char *mod_name,
21 static inline void tst_module_load(const char *mod_name, char *const argv[]) in tst_module_load() argument
23 tst_module_load_(NULL, mod_name, argv); in tst_module_load()
26 void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name);
28 static inline void tst_module_unload(const char *mod_name) in tst_module_unload() argument
30 tst_module_unload_(NULL, mod_name); in tst_module_unload()
/third_party/ltp/include/old/
Dold_module.h37 void tst_module_exists_(void (cleanup_fn)(void), const char *mod_name,
40 void tst_module_load_(void (cleanup_fn)(void), const char *mod_name,
43 void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name);
56 const char *mod_name, char **mod_path) in tst_module_exists() argument
58 tst_module_exists_(cleanup_fn, mod_name, mod_path); in tst_module_exists()
73 const char *mod_name, char *const argv[]) in tst_module_load() argument
75 tst_module_load_(cleanup_fn, mod_name, argv); in tst_module_load()
84 static inline void tst_module_unload(void (cleanup_fn)(void), const char *mod_name) in tst_module_unload() argument
86 tst_module_unload_(cleanup_fn, mod_name); in tst_module_unload()
/third_party/ltp/lib/
Dtst_module.c32 const char *mod_name, char **mod_path) in tst_module_exists_() argument
35 if (access(mod_name, F_OK) == 0) { in tst_module_exists_()
37 *mod_path = strdup(mod_name); in tst_module_exists_()
46 ltproot, mod_name) == -1) { in tst_module_exists_()
58 mod_name) == -1) { in tst_module_exists_()
70 mod_name); in tst_module_exists_()
81 const char *mod_name, char *const argv[]) in tst_module_load_() argument
84 tst_module_exists_(cleanup_fn, mod_name, &mod_path); in tst_module_load_()
104 void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name) in tst_module_unload_() argument
108 const char *const argv[] = { "rmmod", mod_name, NULL }; in tst_module_unload_()
[all …]
/third_party/python/Lib/test/test_importlib/import_/
Dtest_meta_path.py26 mod_name = 'for_real'
28 util.mock_spec(mod_name) as second:
31 self.assertIs(self.__import__(mod_name), second.modules[mod_name])
70 mod_name = 'top_level'
71 assert '.' not in mod_name
72 with self.mock_modules(mod_name) as importer:
76 self.__import__(mod_name)
80 self.assertEqual(args[0], mod_name)
86 mod_name = pkg_name + '.module'
88 assert '.' in mod_name
[all …]
/third_party/toybox/toys/other/
Drmmod.c28 char * mod_name; in rmmod_main() local
32 mod_name = basename(*toys.optargs); in rmmod_main()
35 len = strlen(mod_name); in rmmod_main()
36 if (len > 3 && !strcmp(&mod_name[len-3], ".ko" )) mod_name[len-3] = 0; in rmmod_main()
41 if (delete_module(mod_name, flags)) in rmmod_main()
42 perror_exit("failed to unload %s", mod_name); in rmmod_main()
/third_party/rust/crates/linux-raw-sys/gen/src/
Dmain.rs132 let mod_name = header_name.file_stem().unwrap().to_str().unwrap(); in main() localVariable
133 let mod_rs = format!("{}/{}.rs", src_arch, mod_name); in main()
135 writeln!(src_lib_rs, "#[cfg(feature = \"{}\")]", mod_name).unwrap(); in main()
143 writeln!(src_lib_rs, "#[path = \"{}/{}.rs\"]", rust_arch, mod_name).unwrap(); in main()
144 writeln!(src_lib_rs, "pub mod {};", mod_name).unwrap(); in main()
150 mod_name, in main()
156 if features.insert(mod_name.to_owned()) { in main()
157 writeln!(cargo_toml, "{} = []", mod_name).unwrap(); in main()
293 mod_name: &str, in run_bindgen()
301 mod_name, linux_version, rust_arch in run_bindgen()
[all …]
/third_party/python/Python/
Ddynload_shlib.c103 PyObject *mod_name; in _PyImport_FindSharedFuncptr() local
112 mod_name = PyUnicode_FromString(shortname); in _PyImport_FindSharedFuncptr()
113 if (mod_name == NULL) { in _PyImport_FindSharedFuncptr()
120 Py_DECREF(mod_name); in _PyImport_FindSharedFuncptr()
123 PyErr_SetImportError(error_ob, mod_name, path); in _PyImport_FindSharedFuncptr()
125 Py_DECREF(mod_name); in _PyImport_FindSharedFuncptr()
/third_party/ltp/testcases/lib/
Dtest.sh373 local mod_name="$1"
375 if [ -f "$mod_name" ]; then
376 TST_MODPATH="$mod_name"
380 local mod_path="$LTPROOT/testcases/bin/$mod_name"
387 mod_path="$TST_STARTWD/$mod_name"
394 tst_brkm TCONF "Failed to find module '$mod_name'"
/third_party/python/Lib/lib2to3/fixes/
Dfix_renames.py63 mod_name = results.get("module_name")
68 if mod_name and attr_name:
69 new_attr = LOOKUP[(mod_name.value, attr_name.value)]
Dfix_imports.py125 mod_name = import_mod.value
126 new_name = self.mapping[mod_name]
131 self.replace[mod_name] = new_name
Dfix_import.py69 for mod_name in traverse_imports(imp):
70 if self.probably_a_local_import(mod_name):
/third_party/python/Lib/multiprocessing/
Dspawn.py240 def _fixup_main_from_name(mod_name): argument
246 if mod_name == "__main__" or mod_name.endswith(".__main__"):
250 if getattr(current_main.__spec__, "name", None) == mod_name:
258 main_content = runpy.run_module(mod_name,
/third_party/python/Objects/
Dmoduleobject.c725 PyObject *attr, *mod_name, *getattr; in module_getattro() local
740 mod_name = _PyDict_GetItemIdWithError(m->md_dict, &PyId___name__); in module_getattro()
741 if (mod_name && PyUnicode_Check(mod_name)) { in module_getattro()
742 Py_INCREF(mod_name); in module_getattro()
745 Py_DECREF(mod_name); in module_getattro()
754 mod_name, name); in module_getattro()
759 mod_name, name); in module_getattro()
762 Py_DECREF(mod_name); in module_getattro()
/third_party/pulseaudio/src/modules/alsa/
Dalsa-ucm.c681 static char *modifier_name_to_role(const char *mod_name, bool *is_sink) { in modifier_name_to_role() argument
686 if (pa_startswith(mod_name, "Play")) { in modifier_name_to_role()
688 sub = pa_xstrdup(mod_name + 4); in modifier_name_to_role()
689 } else if (pa_startswith(mod_name, "Capture")) in modifier_name_to_role()
690 sub = pa_xstrdup(mod_name + 7); in modifier_name_to_role()
694 pa_log_warn("Can't match media roles for modifer %s", mod_name); in modifier_name_to_role()
707 …m_set_media_roles(pa_alsa_ucm_modifier *modifier, pa_alsa_ucm_device *list, const char *mod_name) { in ucm_set_media_roles() argument
713 sub = modifier_name_to_role(mod_name, &is_sink); in ucm_set_media_roles()
883 const char *mod_name = pa_proplist_gets(mod->proplist, PA_ALSA_PROP_UCM_NAME); in pa_alsa_ucm_get_verb() local
886 ucm_get_modifier_property(mod, uc_mgr, mod_name); in pa_alsa_ucm_get_verb()
[all …]
/third_party/python/Lib/idlelib/
Dpathbrowser.py93 mod_name = name[:i]
94 if mod_name not in modules:
95 modules[mod_name] = None
/third_party/FreeBSD/stand/kshim/
Dbsd_kernel.c93 if (devclass_equal(mod->mod_name, modname)) { in get_debug_module()
106 PRINTK("%s\n", mod->mod_name); in debug_module_dump()
/third_party/python/Doc/library/
Drunpy.rst30 .. function:: run_module(mod_name, init_globals=None, run_name=None, alter_sys=False)
40 The *mod_name* argument should be an absolute module name.
59 :const:`None`, to ``mod_name + '.__main__'`` if the named module is a
60 package and to the *mod_name* argument otherwise.
63 module (that is, ``__spec__.name`` will always be *mod_name* or
64 ``mod_name + '.__main__``, never *run_name*).
/third_party/selinux/checkpolicy/
Dcheckmodule.c290 char *mod_name = modpolicydb.name; in main() local
301 if (strcmp(mod_name, out_name) != 0) { in main()
302 …%s: Module name %s is different than the output base filename %s\n", argv[0], mod_name, out_name); in main()
/third_party/elfutils/tests/
Ddwflsyms.c108 void **user __attribute__ ((unused)), const char *mod_name, in list_syms() argument
115 printf ("%s: %s\n", mod_name, dwfl_errmsg (-1)); in list_syms()
/third_party/selinux/libsepol/src/
Dlink.c2075 const char *mod_name = cur->branch_list->module_name ? in debug_requirements() local
2091 mod_name, cur->branch_list->decl_id, in debug_requirements()
2097 mod_name, cur->branch_list->decl_id, in debug_requirements()
2105 mod_name, cur->branch_list->decl_id, in debug_requirements()
2115 mod_name, cur->branch_list->decl_id, in debug_requirements()
2134 const char *mod_name = cur->branch_list->module_name ? in print_missing_requirements() local
2150 mod_name, in print_missing_requirements()
2155 mod_name, in print_missing_requirements()
2206 const char *mod_name = decl->module_name ? in enable_avrules() local
2209 mod_name, decl->decl_id); in enable_avrules()

12