1 new changeset in pytest:

http://bitbucket.org/hpk42/pytest/changeset/cdf4f616a0c3/
changeset:   cdf4f616a0c3
user:        hpk42
date:        2011-09-25 07:40:43
summary:     fix issue75 - test failure on jython.

also experimentally enable more tests in the jython test env.
affected #:  4 files (-1 bytes)

--- a/CHANGELOG Sat Sep 24 15:19:03 2011 +0200
+++ b/CHANGELOG Sun Sep 25 07:40:43 2011 +0200
@@ -2,6 +2,7 @@
 ----------------------------------------
 
 - 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
 ----------------------------------------


--- a/_pytest/pytester.py       Sat Sep 24 15:19:03 2011 +0200
+++ b/_pytest/pytester.py       Sun Sep 25 07:40:43 2011 +0200
@@ -25,6 +25,7 @@
         _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)


--- a/testing/test_skipping.py  Sat Sep 24 15:19:03 2011 +0200
+++ b/testing/test_skipping.py  Sun Sep 25 07:40:43 2011 +0200
@@ -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 @@
             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 @@
         "*ERROR*test_syntax*",
         "*evaluating*xfail*expression*",
         "    syntax error",
-        "                ^",
+        markline,
         "SyntaxError: invalid syntax",
         "*1 pass*2 error*",
     ])


--- a/tox.ini   Sat Sep 24 15:19:03 2011 +0200
+++ b/tox.ini   Sun Sep 25 07:40:43 2011 +0200
@@ -66,7 +66,7 @@
 [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]

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to