1 new changeset in pytest:

http://bitbucket.org/hpk42/pytest/changeset/dc450bd494a6/
changeset:   dc450bd494a6
user:        hpk42
date:        2011-07-13 18:47:27
summary:     put systemout/systemerr to correct xml location
affected #:  4 files (103 bytes)

--- a/_pytest/__init__.py       Tue Jul 12 17:09:14 2011 -0500
+++ b/_pytest/__init__.py       Wed Jul 13 18:47:27 2011 +0200
@@ -1,2 +1,2 @@
 #
-__version__ = '2.1.1.dev2'
+__version__ = '2.1.1.dev3'


--- a/_pytest/junitxml.py       Tue Jul 12 17:09:14 2011 -0500
+++ b/_pytest/junitxml.py       Wed Jul 13 18:47:27 2011 +0200
@@ -115,15 +115,13 @@
             self.skipped += 1
         else:
             sec = dict(report.sections)
-            fmt = '<failure message="test failure">%s'
-            args = [report.longrepr]
+            self.appendlog('<failure message="test failure">%s</failure>',
+                report.longrepr)
             for name in ('out', 'err'):
                 content = sec.get("Captured std%s" % name)
                 if content:
-                    fmt += "<system-%s>%%s</system-%s>" % (name, name)
-                    args.append(content)
-            fmt += "</failure>"
-            self.appendlog(fmt, *args)
+                    self.appendlog(
+                        "<system-%s>%%s</system-%s>" % (name, name), content)
             self.failed += 1
         self._closetestcase()
 


--- a/setup.py  Tue Jul 12 17:09:14 2011 -0500
+++ b/setup.py  Wed Jul 13 18:47:27 2011 +0200
@@ -24,7 +24,7 @@
         name='pytest',
         description='py.test: simple powerful testing with Python',
         long_description = long_description,
-        version='2.1.1.dev2',
+        version='2.1.1.dev3',
         url='http://pytest.org',
         license='MIT license',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],


--- a/testing/test_junitxml.py  Tue Jul 12 17:09:14 2011 -0500
+++ b/testing/test_junitxml.py  Wed Jul 13 18:47:27 2011 +0200
@@ -150,9 +150,11 @@
         fnode = tnode.getElementsByTagName("failure")[0]
         assert_attr(fnode, message="test failure")
         assert "ValueError" in fnode.toxml()
-        systemout = fnode.getElementsByTagName("system-out")[0]
+        systemout = fnode.nextSibling
+        assert systemout.tagName == "system-out"
         assert "hello-stdout" in systemout.toxml()
-        systemerr = fnode.getElementsByTagName("system-err")[0]
+        systemerr = systemout.nextSibling
+        assert systemerr.tagName == "system-err"
         assert "hello-stderr" in systemerr.toxml()
 
     def test_failure_escape(self, testdir):

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