summaryrefslogtreecommitdiff
path: root/tests/modules/process_test
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-01-14 13:22:36 -0500
committerNed Batchelder <ned@nedbatchelder.com>2017-01-14 13:22:36 -0500
commit04beb40df71bd0c3774f44016bfc85389319ef7f (patch)
tree6e38fa1a45d15d13fb703e7e41c313734dc230a1 /tests/modules/process_test
parentef13e807a709ad0cda9c0f51b4e43894dc735ecb (diff)
downloadpython-coveragepy-git-04beb40df71bd0c3774f44016bfc85389319ef7f.tar.gz
More Jython test fixes/skips
Diffstat (limited to 'tests/modules/process_test')
-rw-r--r--tests/modules/process_test/try_execfile.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/modules/process_test/try_execfile.py b/tests/modules/process_test/try_execfile.py
index 70905071..03742512 100644
--- a/tests/modules/process_test/try_execfile.py
+++ b/tests/modules/process_test/try_execfile.py
@@ -50,6 +50,8 @@ def without_same_files(filenames):
reduced.append(filename)
return reduced
+skips = os.getenv('COVERAGE_TRY_EXECFILE_SKIPS', '').split()
+
cleaned_sys_path = [os.path.normcase(p) for p in without_same_files(sys.path)]
DATA = "xyzzy"
@@ -65,6 +67,10 @@ FN_VAL = my_function("fooey")
loader = globals().get('__loader__')
fullname = getattr(loader, 'fullname', None) or getattr(loader, 'name', None)
+argv = sys.argv
+if 'argv0' in skips:
+ argv[0] = '*skipped*'
+
globals_to_check = {
'__name__': __name__,
'__file__': __file__,
@@ -77,7 +83,7 @@ globals_to_check = {
'DATA': DATA,
'FN_VAL': FN_VAL,
'__main__.DATA': getattr(__main__, "DATA", "nothing"),
- 'argv': sys.argv,
+ 'argv': argv,
'path': cleaned_sys_path,
}