From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QXIZZ-0006um-DY for garchives@archives.gentoo.org; Thu, 16 Jun 2011 19:49:49 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 604111C0D9; Thu, 16 Jun 2011 19:49:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2F66E1C0D9 for ; Thu, 16 Jun 2011 19:49:17 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BAFC51B401C for ; Thu, 16 Jun 2011 19:49:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 6F7B58003C for ; Thu, 16 Jun 2011 19:49:15 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: Subject: [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/library/, PMSTestSuite/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: PMSTestSuite/cli.py PMSTestSuite/library/case.py X-VCS-Directories: PMSTestSuite/library/ PMSTestSuite/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: cfe64f1d21a3c971b7a01562aefe0be398b58620 Date: Thu, 16 Jun 2011 19:49:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: d59eabd3d14b4c67b9cc0fa4403ad4af commit: cfe64f1d21a3c971b7a01562aefe0be398b58620 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Thu Jun 16 19:43:46 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Thu Jun 16 19:43:46 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3Dcfe64f1d Stringify tests when printing (to freetext description). --- PMSTestSuite/cli.py | 2 +- PMSTestSuite/library/case.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/PMSTestSuite/cli.py b/PMSTestSuite/cli.py index d031a4c..80b234c 100644 --- a/PMSTestSuite/cli.py +++ b/PMSTestSuite/cli.py @@ -126,7 +126,7 @@ class PMSTestSuiteCLI(object): % (len(self.test_library) - len(self.failed), len(self.test_library), len(self.failed))) for t in self.failed: - print('- %s' % t.p) + print('- %s' % t) =20 self.ret =3D 0 if not self.failed else 1 self.loop.quit() diff --git a/PMSTestSuite/library/case.py b/PMSTestSuite/library/case.py index d16cedd..4126c26 100644 --- a/PMSTestSuite/library/case.py +++ b/PMSTestSuite/library/case.py @@ -124,13 +124,20 @@ class EbuildTestCase(TestCase): """ Return CPV for the test. """ return 'pms-test/%s' % self.p =20 + @property + def _stripped_docstring(self): + descdoc =3D ' '.join(self.__doc__.split()) + return descdoc.rstrip('.') + def _finalize(self): TestCase._finalize(self) =20 if 'DESCRIPTION' not in self.ebuild_vars: - descdoc =3D ' '.join(self.__doc__.split()) + self.ebuild_vars['DESCRIPTION'] =3D self._stripped_docstring =20 - self.ebuild_vars['DESCRIPTION'] =3D descdoc.rstrip('.') + def __str__(self): + """ Return freetext test description. """ + return '%s (%s)' % (self.p, self._stripped_docstring) =20 def __init__(self, eapi): """ Instiantate the test case for a particular EAPI. """