summaryrefslogtreecommitdiffstats
path: root/Lib/test/script_helper.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2010-08-17 13:06:11 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2010-08-17 13:06:11 (GMT)
commitd26c18adccf02321592cd58a2dadb0ab68af6906 (patch)
tree0429b57ab0d5cc0b36ca68af24f382c888cbcf9c /Lib/test/script_helper.py
parent46e63805638e0fac20aeae837e1f93b4a675446a (diff)
downloadcpython-d26c18adccf02321592cd58a2dadb0ab68af6906.zip
cpython-d26c18adccf02321592cd58a2dadb0ab68af6906.tar.gz
cpython-d26c18adccf02321592cd58a2dadb0ab68af6906.tar.bz2
Issue #8202: Set sys.argv[0] to -m rather than -c while searching for the module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
Diffstat (limited to 'Lib/test/script_helper.py')
-rw-r--r--Lib/test/script_helper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py
index 28d5e9d..7a29ec6 100644
--- a/Lib/test/script_helper.py
+++ b/Lib/test/script_helper.py
@@ -86,9 +86,9 @@ def make_zip_script(zip_dir, zip_basename, script_name, name_in_zip=None):
# zip_file.close()
return zip_name, os.path.join(zip_name, name_in_zip)
-def make_pkg(pkg_dir):
+def make_pkg(pkg_dir, init_source=''):
os.mkdir(pkg_dir)
- make_script(pkg_dir, '__init__', '')
+ make_script(pkg_dir, '__init__', init_source)
def make_zip_pkg(zip_dir, zip_basename, pkg_name, script_basename,
source, depth=1, compiled=False):