diff --git a/CHANGELOG b/CHANGELOG index 53a19d5ae..e3bafb69e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes between 2.1.2 and [next version] ---------------------------------------- - fix issue67 / junitxml now contains correct test durations, thanks ronny +- fix issue75 / skipping test failure on jython Changes between 2.1.1 and 2.1.2 ---------------------------------------- diff --git a/_pytest/pytester.py b/_pytest/pytester.py index 8bfa3d37b..3edfc6dd5 100644 --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -25,6 +25,7 @@ def pytest_configure(config): _pytest_fullpath except NameError: _pytest_fullpath = os.path.abspath(pytest.__file__.rstrip("oc")) + _pytest_fullpath = _pytest_fullpath.replace("$py.class", ".py") def pytest_funcarg___pytest(request): return PytestArg(request) diff --git a/testing/test_skipping.py b/testing/test_skipping.py index 0bb29b60f..7bcc8bfb7 100644 --- a/testing/test_skipping.py +++ b/testing/test_skipping.py @@ -1,4 +1,5 @@ import pytest +import sys from _pytest.skipping import MarkEvaluator, folded_skips from _pytest.skipping import pytest_runtest_setup @@ -486,6 +487,10 @@ def test_errors_in_xfail_skip_expressions(testdir): pass """) result = testdir.runpytest() + markline = " ^" + if sys.platform.startswith("java"): + # XXX report this to java + markline = "*" + markline[8:] result.stdout.fnmatch_lines([ "*ERROR*test_nameerror*", "*evaluating*skipif*expression*", @@ -493,7 +498,7 @@ def test_errors_in_xfail_skip_expressions(testdir): "*ERROR*test_syntax*", "*evaluating*xfail*expression*", " syntax error", - " ^", + markline, "SyntaxError: invalid syntax", "*1 pass*2 error*", ]) diff --git a/tox.ini b/tox.ini index a80e3755c..6605d35bd 100644 --- a/tox.ini +++ b/tox.ini @@ -66,7 +66,7 @@ deps=py>=1.4.0 [testenv:jython] changedir=testing commands= - {envpython} {envbindir}/py.test-jython --no-tools-on-path \ + {envpython} {envbindir}/py.test-jython \ -rfsxX --junitxml={envlogdir}/junit-{envname}2.xml [] [pytest]