summaryrefslogtreecommitdiff
path: root/tests/test_process.py
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/test_process.py
parentef13e807a709ad0cda9c0f51b4e43894dc735ecb (diff)
downloadpython-coveragepy-git-04beb40df71bd0c3774f44016bfc85389319ef7f.tar.gz
More Jython test fixes/skips
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index be9bdb76..0bf2a7a5 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -460,6 +460,11 @@ class ProcessTest(CoverageTest):
def test_coverage_run_dir_is_like_python_dir(self):
with open(TRY_EXECFILE) as f:
self.make_file("with_main/__main__.py", f.read())
+
+ if env.JYTHON:
+ # Jython has a different sys.argv[0].
+ self.set_environ("COVERAGE_TRY_EXECFILE_SKIPS", "argv0")
+
out_cov = self.run_command("coverage run with_main")
out_py = self.run_command("python with_main")
@@ -533,6 +538,11 @@ class ProcessTest(CoverageTest):
self.make_file("sub/__init__.py", "")
with open(TRY_EXECFILE) as f:
self.make_file("sub/run_me.py", f.read())
+
+ if env.JYTHON:
+ # Jython has a different sys.argv[0].
+ self.set_environ("COVERAGE_TRY_EXECFILE_SKIPS", "argv0")
+
out_cov = self.run_command("coverage run -m sub.run_me")
out_py = self.run_command("python -m sub.run_me")
self.assertMultiLineEqual(out_cov, out_py)
@@ -873,6 +883,11 @@ class AliasedCommandTest(CoverageTest):
run_in_temp_dir = False
+ def setUp(self):
+ super(AliasedCommandTest, self).setUp()
+ if env.JYTHON:
+ self.skipTest("Coverage command names don't work on Jython")
+
def test_major_version_works(self):
# "coverage2" works on py2
cmd = "coverage%d" % sys.version_info[0]