summaryrefslogtreecommitdiff
path: root/test/try_execfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/try_execfile.py')
-rw-r--r--test/try_execfile.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/test/try_execfile.py b/test/try_execfile.py
index 523823e4..f66b9c5b 100644
--- a/test/try_execfile.py
+++ b/test/try_execfile.py
@@ -1,5 +1,25 @@
+"""Test file for run_python_file."""
+
+import pprint, sys
+
+DATA = "xyzzy"
+
+import __main__
+
+def my_function(a):
+ return "my_fn(%r)" % a
+
+FN_VAL = my_function("fooey")
+
globals_to_check = {
'__name__': __name__,
'__file__': __file__,
+ '__doc__': __doc__,
+ 'DATA': DATA,
+ 'FN_VAL': FN_VAL,
+ '__main__.DATA': getattr(__main__, "DATA", "nothing"),
+ 'argv': sys.argv,
+ 'path0': sys.path[0],
}
-print repr(globals_to_check)
+
+pprint.pprint(globals_to_check)