[Pytest-commit] commit/pytest: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Sep 22 19:25:40 CEST 2014
2 new commits in pytest:
https://bitbucket.org/hpk42/pytest/commits/789f64c851d5/
Changeset: 789f64c851d5
User: nicoddemus
Date: 2014-09-16 01:04:46+00:00
Summary: fix issue575: xunit-xml reporting collection errors as failures
Affected #: 3 files
diff -r 81d45151f455fd7ca06501bb2a895ac0feb54bd2 -r 789f64c851d59e38a5860d198b5d71e96963ffe5 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
NEXT
-----------
+- fix issue575: xunit-xml was reporting collection errors as failures
+ instead of errors, thanks Oleg Sinyavskiy.
+
- fix issue582: fix setuptools example, thanks Laszlo Papp and Ronny
Pfannschmidt.
diff -r 81d45151f455fd7ca06501bb2a895ac0feb54bd2 -r 789f64c851d59e38a5860d198b5d71e96963ffe5 _pytest/junitxml.py
--- a/_pytest/junitxml.py
+++ b/_pytest/junitxml.py
@@ -129,10 +129,10 @@
self.failed += 1
self._write_captured_output(report)
- def append_collect_failure(self, report):
+ def append_collect_error(self, report):
#msg = str(report.longrepr.reprtraceback.extraline)
- self.append(Junit.failure(bin_xml_escape(report.longrepr),
- message="collection failure"))
+ self.append(Junit.error(bin_xml_escape(report.longrepr),
+ message="collection failure"))
self.errors += 1
def append_collect_skipped(self, report):
@@ -181,7 +181,7 @@
if not report.passed:
self._opentestcase(report)
if report.failed:
- self.append_collect_failure(report)
+ self.append_collect_error(report)
else:
self.append_collect_skipped(report)
diff -r 81d45151f455fd7ca06501bb2a895ac0feb54bd2 -r 789f64c851d59e38a5860d198b5d71e96963ffe5 testing/test_junitxml.py
--- a/testing/test_junitxml.py
+++ b/testing/test_junitxml.py
@@ -252,7 +252,7 @@
assert_attr(tnode,
#classname="test_collect_error",
name="test_collect_error")
- fnode = tnode.getElementsByTagName("failure")[0]
+ fnode = tnode.getElementsByTagName("error")[0]
assert_attr(fnode, message="collection failure")
assert "SyntaxError" in fnode.toxml()
@@ -489,7 +489,7 @@
log.pytest_sessionstart()
log._opentestcase(report)
log.append_failure(report)
- log.append_collect_failure(report)
+ log.append_collect_error(report)
log.append_collect_skipped(report)
log.append_error(report)
report.longrepr = "filename", 1, ustr
https://bitbucket.org/hpk42/pytest/commits/68fd027f0037/
Changeset: 68fd027f0037
User: hpk42
Date: 2014-09-22 17:25:34+00:00
Summary: Merged in nicoddemus/pytest (pull request #203)
fix issue575: xunit-xml reporting collection errors as failures
Affected #: 3 files
diff -r 95428e0c36e169596f8370c6663a99e960c01612 -r 68fd027f00370ce8ddb5d1912d80ee0d8c63cbf5 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
NEXT
-----------
+- fix issue575: xunit-xml was reporting collection errors as failures
+ instead of errors, thanks Oleg Sinyavskiy.
+
- fix issue582: fix setuptools example, thanks Laszlo Papp and Ronny
Pfannschmidt.
diff -r 95428e0c36e169596f8370c6663a99e960c01612 -r 68fd027f00370ce8ddb5d1912d80ee0d8c63cbf5 _pytest/junitxml.py
--- a/_pytest/junitxml.py
+++ b/_pytest/junitxml.py
@@ -129,10 +129,10 @@
self.failed += 1
self._write_captured_output(report)
- def append_collect_failure(self, report):
+ def append_collect_error(self, report):
#msg = str(report.longrepr.reprtraceback.extraline)
- self.append(Junit.failure(bin_xml_escape(report.longrepr),
- message="collection failure"))
+ self.append(Junit.error(bin_xml_escape(report.longrepr),
+ message="collection failure"))
self.errors += 1
def append_collect_skipped(self, report):
@@ -181,7 +181,7 @@
if not report.passed:
self._opentestcase(report)
if report.failed:
- self.append_collect_failure(report)
+ self.append_collect_error(report)
else:
self.append_collect_skipped(report)
diff -r 95428e0c36e169596f8370c6663a99e960c01612 -r 68fd027f00370ce8ddb5d1912d80ee0d8c63cbf5 testing/test_junitxml.py
--- a/testing/test_junitxml.py
+++ b/testing/test_junitxml.py
@@ -252,7 +252,7 @@
assert_attr(tnode,
#classname="test_collect_error",
name="test_collect_error")
- fnode = tnode.getElementsByTagName("failure")[0]
+ fnode = tnode.getElementsByTagName("error")[0]
assert_attr(fnode, message="collection failure")
assert "SyntaxError" in fnode.toxml()
@@ -489,7 +489,7 @@
log.pytest_sessionstart()
log._opentestcase(report)
log.append_failure(report)
- log.append_collect_failure(report)
+ log.append_collect_error(report)
log.append_collect_skipped(report)
log.append_error(report)
report.longrepr = "filename", 1, ustr
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.
More information about the pytest-commit
mailing list