Home
last modified time | relevance | path

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

1234

/external/python/cpython2/Lib/
Drunpy.py26 def __init__(self, mod_name): argument
27 self.mod_name = mod_name
28 self.module = imp.new_module(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]
63 mod_name=None, mod_fname=None, argument
68 run_globals.update(__name__ = mod_name,
[all …]
/external/python/cpython3/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 …]
/external/python/cpython2/Lib/test/
Dtest_runpy.py86 def expect_import_error(self, mod_name): argument
88 run_module(mod_name)
92 self.fail("Expected import error for " + mod_name)
133 mod_name = (pkg_name+".")*depth + mod_base
134 return pkg_dir, mod_fname, mod_name
136 def _del_pkg(self, top, depth, mod_name): argument
162 pkg_dir, mod_fname, mod_name = (
164 forget(mod_name)
166 if verbose: print "Running from source:", mod_name
167 d1 = run_module(mod_name) # Read from source
[all …]
Dtest_zipimport_support.py111 mod_name = mod.__name__.split(".")[-1]
112 mod_name = mod_name.replace("sample_", "sample_zipped_")
113 sample_sources[mod_name] = src
121 for mod_name, src in sample_sources.items():
122 z.writestr(mod_name + ".py", src)
Dtest_zipimport.py227 mod_name = module_path_to_dotted_name(mod_path)
228 __import__(mod_name)
229 mod = sys.modules[mod_name]
235 self.assertEqual(loader.get_source(mod_name), None)
236 self.assertEqual(loader.get_filename(mod_name), mod.__file__)
271 mod_name = module_path_to_dotted_name(mod_path)
272 __import__(mod_name)
273 mod = sys.modules[mod_name]
279 self.assertEqual(loader.get_source(mod_name), None)
280 self.assertEqual(loader.get_filename(mod_name), mod.__file__)
/external/python/cpython3/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)
/external/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()
/external/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()
/external/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 …]
/external/python/cpython3/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 …]
/external/python/cpython3/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()
/external/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'"
/external/igt-gpu-tools/lib/
Digt_kmod.h31 bool igt_kmod_is_loaded(const char *mod_name);
34 int igt_kmod_load(const char *mod_name, const char *opts);
35 int igt_kmod_unload(const char *mod_name, unsigned int flags);
Digt_kmod.c119 igt_kmod_is_loaded(const char *mod_name) in igt_kmod_is_loaded() argument
132 if (!strcmp(kmod_name, mod_name)) { in igt_kmod_is_loaded()
172 igt_kmod_load(const char *mod_name, const char *opts) in igt_kmod_load() argument
178 err = kmod_module_new_from_name(ctx, mod_name, &kmod); in igt_kmod_load()
218 igt_kmod_unload(const char *mod_name, unsigned int flags) in igt_kmod_unload() argument
224 err = kmod_module_new_from_name(ctx, mod_name, &kmod); in igt_kmod_unload()
226 igt_debug("Could not use module %s (%s)\n", mod_name, in igt_kmod_unload()
233 igt_debug("Could not remove module %s (%s)\n", mod_name, in igt_kmod_unload()
/external/selinux/policycoreutils/hll/pp/
Dpp.c131 char *mod_name = mod_pkg->policy->p.name; in main() local
143 if (mod_name && strcmp(mod_name, cil_name) != 0) { in main()
144 …nux userspace will refer to the module from %s as %s rather than %s\n", ifile, mod_name, cil_name); in main()
/external/python/cpython2/Lib/lib2to3/fixes/
Dfix_renames.py63 mod_name = results.get("module_name")
68 if mod_name and attr_name:
69 new_attr = unicode(LOOKUP[(mod_name.value, attr_name.value)])
Dfix_imports.py125 mod_name = import_mod.value
126 new_name = unicode(self.mapping[mod_name])
131 self.replace[mod_name] = new_name
/external/python/cpython3/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
/external/protobuf/python/google/protobuf/internal/
Dapi_implementation.py62 def _CanImport(mod_name): argument
64 mod = importlib.import_module(mod_name)
67 raise ImportError(mod_name + ' import succeeded but was None')
/external/python/cpython3/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,
/external/python/setuptools/setuptools/
Dsandbox.py161 mod_name
162 for mod_name in sys.modules
163 if mod_name not in saved
165 and not mod_name.startswith('encodings.')
173 for mod_name in list(module_names):
174 del sys.modules[mod_name]
210 def _needs_hiding(mod_name): argument
227 base_module = mod_name.split('.', 1)[0]
Dmonkey.py142 def patch_params(mod_name, func_name): argument
146 repl_prefix = 'msvc9_' if 'msvc9' in mod_name else 'msvc14_'
149 mod = import_module(mod_name)
/external/python/setuptools/setuptools/tests/
Dtest_depends.py13 mod_name = 'setuptools.tests.mod_with_constant'
14 val = depends.get_module_constant(mod_name, 'value')

1234