(self, fullname, path=None, parent=None)
| 266 | """Importer mock using PEP 451 APIs.""" |
| 267 | |
| 268 | def find_spec(self, fullname, path=None, parent=None): |
| 269 | try: |
| 270 | module = self.modules[fullname] |
| 271 | except KeyError: |
| 272 | return None |
| 273 | spec = util.spec_from_file_location( |
| 274 | fullname, module.__file__, loader=self, |
| 275 | submodule_search_locations=getattr(module, '__path__', None)) |
| 276 | return spec |
| 277 | |
| 278 | def create_module(self, spec): |
| 279 | if spec.name not in self.modules: |
no outgoing calls