Home
last modified time | relevance | path

Searched refs:importer (Results 1 – 25 of 134) sorted by relevance

123456

/external/python/cpython3/Lib/test/test_importlib/import_/
Dtest_fromlist.py20 with util.mock_spec('pkg.__init__', 'pkg.module') as importer:
21 with util.import_state(meta_path=[importer]):
27 with util.mock_modules('pkg.__init__', 'pkg.module')as importer:
28 with util.import_state(meta_path=[importer]):
55 with util.mock_modules('module') as importer:
56 with util.import_state(meta_path=[importer]):
62 with util.mock_modules('module') as importer:
63 with util.import_state(meta_path=[importer]):
70 with util.mock_modules('pkg.__init__', 'pkg.module') as importer:
71 with util.import_state(meta_path=[importer]):
[all …]
Dtest_path.py33 importer = util.mock_spec(module)
34 with util.import_state(path_importer_cache={path: importer},
37 self.check_found(found, importer)
44 importer = util.mock_spec(module)
45 with util.import_state(path_importer_cache={path: importer}):
47 self.check_found(found, importer)
53 importer = util.mock_spec(module)
54 with util.import_state(path_importer_cache={path: importer},
63 importer = util.mock_spec(module)
64 hook = util.mock_path_hook(path, importer=importer)
[all …]
Dtest_meta_path.py60 def log_finder(self, importer): argument
61 fxn = getattr(importer, self.finder_name)
72 with self.mock_modules(mod_name) as importer:
73 log, wrapped_call = self.log_finder(importer)
74 setattr(importer, self.finder_name, MethodType(wrapped_call, importer))
75 with util.import_state(meta_path=[importer]):
89 with self.mock_modules(pkg_name+'.__init__', mod_name) as importer:
90 importer.modules[pkg_name].__path__ = path
91 log, wrapped_call = self.log_finder(importer)
92 setattr(importer, self.finder_name, MethodType(wrapped_call, importer))
[all …]
Dtest_caching.py74 with self.create_mock('pkg.__init__', 'pkg.module') as importer:
75 with util.import_state(meta_path=[importer]):
84 with self.create_mock('pkg.__init__', 'pkg.module') as importer:
85 with util.import_state(meta_path=[importer]):
/external/tensorflow/tensorflow/python/framework/
Dimporter_test.py31 from tensorflow.python.framework import importer
63 a, b, c, d = importer.import_graph_def(
122 a, b = importer.import_graph_def(
131 a1, b1 = importer.import_graph_def(
140 a2, b2 = importer.import_graph_def(
149 a3, b3 = importer.import_graph_def(
159 a_a, a_b = importer.import_graph_def(
168 a_a1, a_b1 = importer.import_graph_def(
177 a1_1, b1_1 = importer.import_graph_def(
191 foo, = importer.import_graph_def(
[all …]
/external/python/cpython2/Lib/email/
D__init__.py113 importer = LazyImporter(_name.lower()) variable
114 sys.modules['email.' + _name] = importer
115 setattr(sys.modules['email'], _name, importer)
120 importer = LazyImporter('mime.' + _name.lower()) variable
121 sys.modules['email.MIME' + _name] = importer
122 setattr(sys.modules['email'], 'MIME' + _name, importer)
123 setattr(sys.modules['email.mime'], _name, importer)
/external/python/cpython2/Lib/
Dpkgutil.py102 for importer, name, ispkg in iter_modules(path, prefix):
103 yield importer, name, ispkg
151 def iter_importer_modules(importer, prefix=''): argument
152 if not hasattr(importer, 'iter_modules'):
154 return importer.iter_modules(prefix)
329 def iter_zipimport_modules(importer, prefix=''): argument
330 dirlist = zipimport._zip_directory_cache[importer.archive].keys()
332 _prefix = importer.prefix
378 importer = sys.path_importer_cache[path_item]
382 importer = path_hook(path_item)
[all …]
Drunpy.py201 importer = cache[path_name]
209 importer = hook(path_name)
219 importer = imp.NullImporter(path_name)
222 cache[path_name] = importer
223 return importer
247 importer = _get_importer(path_name)
248 if isinstance(importer, imp.NullImporter):
/external/python/cpython3/Lib/test/test_importlib/
Dtest_lazy.py80 importer = TestingImporter()
81 assert importer.loaded is None
82 with test_util.uncache(importer.module_name):
83 with test_util.import_state(meta_path=[importer]):
84 module = importlib.import_module(importer.module_name)
85 self.assertIsNone(importer.loaded)
87 self.assertEqual(module.__loader__, importer)
88 self.assertIsNotNone(importer.loaded)
89 self.assertEqual(module, importer.loaded)
/external/python/cpython3/Lib/
Dpkgutil.py137 def iter_importer_modules(importer, prefix=''): argument
138 if not hasattr(importer, 'iter_modules'):
140 return importer.iter_modules(prefix)
144 def _iter_file_finder_modules(importer, prefix=''): argument
145 if importer.path is None or not os.path.isdir(importer.path):
151 filenames = os.listdir(importer.path)
162 path = os.path.join(importer.path, fn)
371 def iter_zipimport_modules(importer, prefix=''): argument
372 dirlist = sorted(zipimport._zip_directory_cache[importer.archive])
373 _prefix = importer.prefix
[all …]
/external/drm_hwcomposer/
Dhwcutils.cpp46 int DrmHwcBuffer::ImportBuffer(buffer_handle_t handle, Importer *importer) { in ImportBuffer() argument
49 int ret = importer->ImportBuffer(handle, &tmp_bo); in ImportBuffer()
57 importer_ = importer; in ImportBuffer()
110 int DrmHwcLayer::ImportBuffer(Importer *importer) { in ImportBuffer() argument
111 int ret = buffer.ImportBuffer(sf_handle, importer); in ImportBuffer()
133 Importer *importer) { in InitFromDrmHwcLayer() argument
141 return ImportBuffer(importer); in InitFromDrmHwcLayer()
Dplatformminigbm.cpp35 DrmMinigbmImporter *importer = new DrmMinigbmImporter(drm); in CreateInstance() local
36 if (!importer) in CreateInstance()
39 int ret = importer->Init(); in CreateInstance()
42 delete importer; in CreateInstance()
45 return importer; in CreateInstance()
Ddrmhwcomposer.h47 DrmHwcBuffer(const hwc_drm_bo &bo, Importer *importer) in DrmHwcBuffer() argument
48 : bo_(bo), importer_(importer) { in DrmHwcBuffer()
74 int ImportBuffer(buffer_handle_t handle, Importer *importer);
144 int ImportBuffer(Importer *importer);
145 int InitFromDrmHwcLayer(DrmHwcLayer *layer, Importer *importer);
Dplatformdrmgeneric.cpp36 DrmGenericImporter *importer = new DrmGenericImporter(drm); in CreateInstance() local
37 if (!importer) in CreateInstance()
40 int ret = importer->Init(); in CreateInstance()
43 delete importer; in CreateInstance()
46 return importer; in CreateInstance()
Dresourcemanager.cpp63 std::shared_ptr<Importer> importer; in AddDrmDevice() local
64 importer.reset(Importer::CreateInstance(drm.get())); in AddDrmDevice()
65 if (!importer) { in AddDrmDevice()
69 importers_.push_back(importer); in AddDrmDevice()
Dplatformhisi.cpp38 HisiImporter *importer = new HisiImporter(drm); in CreateInstance() local
39 if (!importer) in CreateInstance()
42 int ret = importer->Init(); in CreateInstance()
45 delete importer; in CreateInstance()
48 return importer; in CreateInstance()
/external/python/apitools/apitools/base/protorpclite/
Dmessages_test.py1972 importer=self.Importer)
1980 importer=self.Importer)
1988 importer=self.Importer)
1997 importer=self.Importer)
2003 importer=self.Importer))
2007 messages.find_definition('a.b.c.B.C', importer=self.Importer))
2024 'A', a, importer=self.Importer))
2026 'b.B', a, importer=self.Importer))
2028 'b.c.C', a, importer=self.Importer))
2030 'b.d.D', a, importer=self.Importer))
[all …]
Ddescriptor.py473 def import_descriptor_loader(definition_name, importer=__import__): argument
500 module = importer(definition_name, '', '', [leaf])
509 importer=__import__))
519 parent, importer=importer)
/external/python/cpython2/Lib/test/
Dtest_importhooks.py159 def doTestImports(self, importer=None): argument
172 if importer:
173 self.assertEqual(hooktestmodule.__loader__, importer)
174 self.assertEqual(hooktestpackage.__loader__, importer)
175 self.assertEqual(hooktestpackage.sub.__loader__, importer)
176 self.assertEqual(hooktestpackage.sub.subber.__loader__, importer)
/external/python/setuptools/setuptools/
Dsite-patch.py17 importer = pic.get(item)
18 if importer is not None:
19 loader = importer.find_module('site')
/external/protobuf/src/google/protobuf/compiler/cpp/
Dcpp_bootstrap_unittest.cc125 Importer importer(&source_tree, &error_collector); in TEST() local
127 importer.Import("google/protobuf/descriptor.proto"); in TEST()
129 importer.Import("google/protobuf/compiler/plugin.proto"); in TEST()
/external/tensorflow/tensorflow/python/training/
Dquantize_training_test.py26 from tensorflow.python.framework import importer
75 _ = importer.import_graph_def(result, name='')
87 _ = importer.import_graph_def(result, name='')
/external/python/cpython3/Lib/test/test_importlib/extension/
Dtest_finder.py15 importer = self.machinery.FileFinder(util.EXTENSIONS.path,
20 return importer.find_module(fullname)
/external/python/cpython2/Modules/
Dmain.c213 PyObject *argv0 = NULL, *importer = NULL; in RunMainFromImporter() local
216 (importer = PyImport_GetImporter(argv0)) && in RunMainFromImporter()
217 (importer->ob_type != &PyNullImporter_Type)) in RunMainFromImporter()
226 Py_DECREF(importer); in RunMainFromImporter()
232 Py_XDECREF(importer); in RunMainFromImporter()
/external/tensorflow/tensorflow/python/tools/
Doptimize_for_inference_test.py29 from tensorflow.python.framework import importer
166 _ = importer.import_graph_def(
217 _ = importer.import_graph_def(
248 _ = importer.import_graph_def(
278 _ = importer.import_graph_def(
308 _ = importer.import_graph_def(

123456