summaryrefslogtreecommitdiff
path: root/tests/test_oddball.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-01-18 22:52:10 -0500
committerNed Batchelder <ned@nedbatchelder.com>2017-01-18 22:52:10 -0500
commit8dba481b188f4df23074816f9fa8c32a488482e6 (patch)
tree94df16d98906e0574277b670a6454d04af9a5ff0 /tests/test_oddball.py
parent1a6b57d7d181ba4d8eb6098aab7c58670db69ea9 (diff)
downloadpython-coveragepy-git-8dba481b188f4df23074816f9fa8c32a488482e6.tar.gz
No test failures on Jython
One or two of these are questionable accommodations, but there are no failures.
Diffstat (limited to 'tests/test_oddball.py')
-rw-r--r--tests/test_oddball.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_oddball.py b/tests/test_oddball.py
index c617cf42..fe841bd5 100644
--- a/tests/test_oddball.py
+++ b/tests/test_oddball.py
@@ -231,6 +231,9 @@ class PyexpatTest(CoverageTest):
"""Pyexpat screws up tracing. Make sure we've counter-defended properly."""
def test_pyexpat(self):
+ if env.JYTHON:
+ self.skipTest("Pyexpat isn't a problem on Jython")
+
# pyexpat calls the trace function explicitly (inexplicably), and does
# it wrong for exceptions. Parsing a DOCTYPE for some reason throws
# an exception internally, and triggers its wrong behavior. This test
@@ -381,6 +384,13 @@ class ExceptionTest(CoverageTest):
lines = data.lines(abs_file(filename))
clean_lines[filename] = sorted(lines)
+ if env.JYTHON: # pragma: only jython
+ # Jython doesn't report on try or except lines, so take those
+ # out of the expected lines.
+ invisible = [202, 206, 302, 304]
+ for lines in lines_expected.values():
+ lines[:] = [l for l in lines if l not in invisible]
+
self.assertEqual(clean_lines, lines_expected)