public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: /, PMSTestSuite/library/
Date: Thu, 26 May 2011 07:25:08 +0000 (UTC)	[thread overview]
Message-ID: <61e00e448de8fc651c66d3276d47dea22c6b697f.mgorny@gentoo> (raw)

commit:     61e00e448de8fc651c66d3276d47dea22c6b697f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 07:25:04 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May 26 07:25:04 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=61e00e44

Add doctests for test name cleanup.

---
 PMSTestSuite/library/case.py |    9 +++++++++
 run-tests.py                 |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/PMSTestSuite/library/case.py b/PMSTestSuite/library/case.py
index 02a3b9f..120b71c 100644
--- a/PMSTestSuite/library/case.py
+++ b/PMSTestSuite/library/case.py
@@ -24,6 +24,15 @@ pn_re = re.compile('(.)([A-Z])')
 def cleanup_test_case_name(classname):
 	"""
 	Create the ebuild PN from <classname>.
+
+	>>> cleanup_test_case_name('Testzor')
+	'testzor'
+	>>> cleanup_test_case_name('TestzorTest')
+	'testzor'
+	>>> cleanup_test_case_name('TestZorTest')
+	'test-zor'
+	>>> cleanup_test_case_name('veryRandomCamelCaseTest')
+	'very-random-camel-case'
 	"""
 
 	if classname.endswith('Test'):

diff --git a/run-tests.py b/run-tests.py
index 0868f0c..fe3a8d8 100755
--- a/run-tests.py
+++ b/run-tests.py
@@ -8,6 +8,7 @@ import PMSTestSuite.repository
 
 def load_tests(loader, tests, ignore):
 	tests.addTests(doctest.DocTestSuite(PMSTestSuite.library))
+	tests.addTests(doctest.DocTestSuite(PMSTestSuite.library.case))
 	tests.addTests(doctest.DocTestSuite(PMSTestSuite.pm))
 	tests.addTests(doctest.DocTestSuite(PMSTestSuite.repository))
 	return tests



             reply	other threads:[~2011-05-26  7:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26  7:25 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-05-31 18:10 [gentoo-commits] proj/pms-test-suite:master commit in: /, PMSTestSuite/library/ Michał Górny
2011-05-25 20:40 Michał Górny
2011-05-25 20:40 Michał Górny
2011-05-22 18:47 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61e00e448de8fc651c66d3276d47dea22c6b697f.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox