Lines Matching refs:mod_name
86 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
171 __import__(mod_name)
174 if verbose: print "Running from compiled:", mod_name
175 d2 = run_module(mod_name) # Read from bytecode
180 self._del_pkg(pkg_dir, depth, mod_name)
184 pkg_dir, mod_fname, mod_name = (
186 pkg_name, _, _ = mod_name.rpartition(".")
187 forget(mod_name)
194 __import__(mod_name)
237 pkg_dir, mod_fname, mod_name = (
241 pkg_name = mod_name.rpartition('.')[0]
242 if verbose: print "Running from source:", mod_name
243 d1 = run_module(mod_name, run_name=run_name) # Read from source
249 __import__(mod_name)
252 if verbose: print "Running from compiled:", mod_name
253 d2 = run_module(mod_name, run_name=run_name) # Read from bytecode
260 self._del_pkg(pkg_dir, depth, mod_name)
281 pkg_dir, _, mod_name = result
282 mod_name = mod_name.replace(".__main__", "")
288 run_module(mod_name)
295 self._del_pkg(pkg_dir, 1, mod_name)
353 mod_name = 'script'
354 script_name = self._make_test_script(script_dir, mod_name)
360 mod_name = 'script'
361 script_name = self._make_test_script(script_dir, mod_name)
369 mod_name = '__main__'
370 script_name = self._make_test_script(script_dir, mod_name)
376 mod_name = '__main__'
377 script_name = self._make_test_script(script_dir, mod_name)
385 mod_name = 'not_main'
386 script_name = self._make_test_script(script_dir, mod_name)
392 mod_name = '__main__'
393 script_name = self._make_test_script(script_dir, mod_name)
399 mod_name = '__main__'
400 script_name = self._make_test_script(script_dir, mod_name)
407 mod_name = 'not_main'
408 script_name = self._make_test_script(script_dir, mod_name)
415 mod_name = '__main__'
418 script_name = self._make_test_script(script_dir, mod_name, source)