diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2011-10-30 22:31:27 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-10-30 22:31:27 -0400 |
commit | 8f059350fda7801522e38e34c1e5851d2975fc7f (patch) | |
tree | 612e4762757a8e8b96526c3f83ec8e2b63bf586e /test/try_execfile.py | |
parent | aa04705df95b2033376f6dab8bfcf83aa6293926 (diff) | |
download | python-coveragepy-8f059350fda7801522e38e34c1e5851d2975fc7f.tar.gz |
Make execution with -m match Python more closely.
Diffstat (limited to 'test/try_execfile.py')
-rw-r--r-- | test/try_execfile.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/try_execfile.py b/test/try_execfile.py index d7ea439..825fdb7 100644 --- a/test/try_execfile.py +++ b/test/try_execfile.py @@ -1,6 +1,6 @@ """Test file for run_python_file.""" -import pprint, sys +import os, pprint, sys DATA = "xyzzy" @@ -18,11 +18,12 @@ globals_to_check = { '__doc__': __doc__, '__builtins__.has_open': hasattr(__builtins__, 'open'), '__builtins__.dir': dir(__builtins__), + '__package__': __package__, 'DATA': DATA, 'FN_VAL': FN_VAL, '__main__.DATA': getattr(__main__, "DATA", "nothing"), 'argv': sys.argv, - 'path0': sys.path[0], + 'path': [os.path.normcase(p) for p in sys.path], } pprint.pprint(globals_to_check) |