• Home
  • Raw
  • Download

Lines Matching refs:mod_name

157         mod_name = "<Nonsense>"
161 mod_spec = importlib.machinery.ModuleSpec(mod_name,
166 "__name__": mod_name,
178 mod_name,
186 def expect_import_error(self, mod_name): argument
188 run_module(mod_name)
192 self.fail("Expected import error for " + mod_name)
245 mod_name = (pkg_name+".")*depth + mod_base
246 mod_spec = importlib.util.spec_from_file_location(mod_name,
248 return pkg_dir, mod_fname, mod_name, mod_spec
289 pkg_dir, mod_fname, mod_name, mod_spec = (
293 forget(mod_name)
296 "__name__": mod_name,
299 "__package__": mod_name.rpartition(".")[0],
309 return run_module(mod_name, init_globals, alter_sys=alter_sys)
311 if verbose > 1: print("Running from source:", mod_name)
314 __import__(mod_name)
318 unload(mod_name) # In case loader caches paths
320 if verbose > 1: print("Running from compiled:", mod_name)
329 pkg_dir, mod_fname, mod_name, mod_spec = (
333 pkg_name = mod_name.rpartition(".")[0]
334 forget(mod_name)
337 "__name__": mod_name,
355 __import__(mod_name)
359 unload(mod_name) # In case loader caches paths
397 pkg_dir, mod_fname, mod_name, mod_spec = (
400 expected_name = mod_name
405 pkg_name = mod_name.rpartition('.')[0]
406 if verbose > 1: print("Running from source:", mod_name)
407 d1 = run_module(mod_name, run_name=run_name) # Read from source
414 __import__(mod_name)
418 unload(mod_name) # In case the loader caches paths
419 if verbose > 1: print("Running from compiled:", mod_name)
421 d2 = run_module(mod_name, run_name=run_name) # Read from bytecode
449 pkg_dir, _, mod_name, _ = result
450 mod_name = mod_name.replace(".__main__", "")
462 run_module(mod_name)
468 run_module(mod_name + ".submodule")
475 pkg_dir, _, mod_name, _ = self._make_pkg("", 1)
477 __import__(mod_name)
480 run_module(mod_name)
485 pkg_dir, _, mod_name, _ = self._make_pkg("", 1, "__main__")
487 package = mod_name.replace(".__main__", "")
495 __import__(mod_name)
537 pkg_dir, mod_fname, mod_name, mod_spec = (
539 forget(mod_name)
545 "__package__": mod_name.rpartition(".")[0],
549 return run_module(mod_name, init_globals, run_name)
575 pkg_dir, mod_fname, mod_name, mod_spec = (
602 expected_argv0, mod_name=None, argument
608 if mod_name is None:
611 spec_name = mod_name
636 if expect_spec and mod_name is None:
652 mod_name = 'script'
653 script_name = self._make_test_script(script_dir, mod_name)
659 mod_name = 'script'
660 script_name = self._make_test_script(script_dir, mod_name,
667 mod_name = 'script'
668 script_name = self._make_test_script(script_dir, mod_name)
676 mod_name = '__main__'
677 script_name = self._make_test_script(script_dir, mod_name)
679 script_dir, mod_name=mod_name)
683 mod_name = '__main__'
684 script_name = self._make_test_script(script_dir, mod_name)
690 script_dir, mod_name=mod_name)
694 mod_name = 'not_main'
695 script_name = self._make_test_script(script_dir, mod_name)
701 mod_name = '__main__'
702 script_name = self._make_test_script(script_dir, mod_name)
705 mod_name=mod_name, check_loader=False)
709 mod_name = '__main__'
710 script_name = self._make_test_script(script_dir, mod_name)
715 mod_name=mod_name, check_loader=False)
719 mod_name = 'not_main'
720 script_name = self._make_test_script(script_dir, mod_name)
728 mod_name = '__main__'
731 script_name = self._make_test_script(script_dir, mod_name, source)