Commits

holger krekel committed cdf4f61

fix issue75 - test failure on jython.

also experimentally enable more tests in the jython test env.

Comments (0)

Files changed (4)

 ----------------------------------------
 
 - 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
 ----------------------------------------
         _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)

testing/test_skipping.py

 import pytest
+import sys
 
 from _pytest.skipping import MarkEvaluator, folded_skips
 from _pytest.skipping import pytest_runtest_setup
             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*",
         "*ERROR*test_syntax*",
         "*evaluating*xfail*expression*",
         "    syntax error",
-        "                ^",
+        markline,
         "SyntaxError: invalid syntax",
         "*1 pass*2 error*",
     ])
 [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]