summaryrefslogtreecommitdiff
path: root/test/try_execfile.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-04-03 23:32:19 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-04-03 23:32:19 -0400
commita56bfefc8d9dac39be06037f2fc074d048b522bc (patch)
treed1423b45a514ac4d71f06a693bcc1e54c70a02c3 /test/try_execfile.py
parent4910434d33d0928374bf966c00c07feda5b32d77 (diff)
downloadpython-coveragepy-git-a56bfefc8d9dac39be06037f2fc074d048b522bc.tar.gz
Factor execfile out of cmdline, so that we can call python main programs properly: now they get the correct value for __file__.
Diffstat (limited to 'test/try_execfile.py')
-rw-r--r--test/try_execfile.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/try_execfile.py b/test/try_execfile.py
new file mode 100644
index 00000000..523823e4
--- /dev/null
+++ b/test/try_execfile.py
@@ -0,0 +1,5 @@
+globals_to_check = {
+ '__name__': __name__,
+ '__file__': __file__,
+}
+print repr(globals_to_check)