summaryrefslogtreecommitdiff
path: root/coverage/execfile.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-12-03 08:54:27 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-12-03 08:54:27 -0500
commit3b6e8394c3e50cb733caafb275d2ae85c0397565 (patch)
treedd960443f9ef3772020d74c102d785968bb44dce /coverage/execfile.py
parent3416380e8e46d839c3111d9f82a5f7d93a218821 (diff)
parent9e4908f37c370250ebc7836e744a59170720a9e3 (diff)
downloadpython-coveragepy-git-3b6e8394c3e50cb733caafb275d2ae85c0397565.tar.gz
Merged default onto config.
--HG-- branch : config
Diffstat (limited to 'coverage/execfile.py')
-rw-r--r--coverage/execfile.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/coverage/execfile.py b/coverage/execfile.py
index ddcfa149..15f0a5f8 100644
--- a/coverage/execfile.py
+++ b/coverage/execfile.py
@@ -16,11 +16,11 @@ except KeyError:
def run_python_file(filename, args):
"""Run a python file as if it were the main program on the command line.
-
+
`filename` is the path to the file to execute, it need not be a .py file.
`args` is the argument array to present as sys.argv, including the first
element representing the file being executed.
-
+
"""
# Create a module to serve as __main__
old_main_mod = sys.modules['__main__']
@@ -44,7 +44,7 @@ def run_python_file(filename, args):
finally:
# Restore the old __main__
sys.modules['__main__'] = old_main_mod
-
+
# Restore the old argv and path
sys.argv = old_argv
sys.path[0] = old_path0