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