diff --git a/py/test/rsession/reporter.py b/py/test/rsession/reporter.py index aa4c5fe36..176b2b3ee 100644 --- a/py/test/rsession/reporter.py +++ b/py/test/rsession/reporter.py @@ -280,6 +280,8 @@ class RemoteReporter(AbstractReporter): def report_FailedTryiter(self, event): self.out.line("FAILED TO LOAD MODULE: %s\n" % "/".join(event.item.listnames())) self.failed_tests_outcome.append(event) + # argh! bad hack, need to fix it + self.failed[self.hosts[0]] += 1 def report_SkippedTryiter(self, event): self.out.line("Skipped (%s) %s\n" % (str(event.excinfo.value), "/". @@ -301,6 +303,7 @@ class LocalReporter(AbstractReporter): #self.show_item(event.item, False) self.out.write("- FAILED TO LOAD MODULE") self.failed_tests_outcome.append(event) + self.failed[self.hosts[0]] += 1 def report_ReceivedItemOutcome(self, event): host = self.hosts[0] diff --git a/py/test/rsession/testing/test_reporter.py b/py/test/rsession/testing/test_reporter.py index fa164f651..1d1c07a78 100644 --- a/py/test/rsession/testing/test_reporter.py +++ b/py/test/rsession/testing/test_reporter.py @@ -135,11 +135,13 @@ class AbstractTestReporter(BasicRsessionTest): r.report(repevent.RsyncFinished()) list(rootcol._tryiter(reporterror=lambda x : AbstractSession.reporterror(r.report, x))) r.report(repevent.TestFinished()) + return r cap = py.io.StdCaptureFD() - boxfun() + r = boxfun() out, err = cap.reset() assert not err + assert out.find("1 failed in") != -1 assert out.find("NameError: name 'sadsadsa' is not defined") != -1 def _test_still_to_go(self): @@ -187,7 +189,7 @@ class TestLocalReporter(AbstractTestReporter): repmod/test_one.py[1] repmod/test_three.py[0] - FAILED TO LOAD MODULE repmod/test_two.py[0] - skipped (reason)""" - assert received.find(expected) != -1 + assert received.find(expected) != -1 class TestRemoteReporter(AbstractTestReporter): reporter = RemoteReporter