public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/pms-test-suite:master commit in: /, PMSTestSuite/library/
@ 2011-05-22 18:47 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2011-05-22 18:47 UTC (permalink / raw
  To: gentoo-commits

commit:     11d892ea21e75a38e05a44f6b21561c1b0e93df7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 18:47:15 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun May 22 18:47:15 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=11d892ea

Add doctests and a test runner.

---
 PMSTestSuite/library/__init__.py |    3 +++
 run-tests.py                     |   12 ++++++++++++
 test.py                          |    6 ------
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/PMSTestSuite/library/__init__.py b/PMSTestSuite/library/__init__.py
index b1d3262..40db438 100644
--- a/PMSTestSuite/library/__init__.py
+++ b/PMSTestSuite/library/__init__.py
@@ -12,6 +12,9 @@ def load_library(name):
 	subclass found there.
 
 	Returns a new TestLibrary subclass instance or raises an ImportError.
+
+	>>> load_library('test') # doctest: +ELLIPSIS
+	<PMSTestSuite.library.test.ExampleLibrary object at ...>
 	"""
 	# XXX: which exceptions can it raise?
 	

diff --git a/run-tests.py b/run-tests.py
new file mode 100755
index 0000000..9f87ef2
--- /dev/null
+++ b/run-tests.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+import unittest
+import doctest
+import PMSTestSuite.library
+
+def load_tests(loader, tests, ignore):
+	tests.addTests(doctest.DocTestSuite(PMSTestSuite.library))
+	return tests
+
+if __name__ == '__main__':
+	unittest.main()

diff --git a/test.py b/test.py
deleted file mode 100644
index 05f2c98..0000000
--- a/test.py
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/python
-# A simple PMSTestSuite.library test script.
-
-from PMSTestSuite.library import load_library
-
-print(load_library('test'))



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/pms-test-suite:master commit in: /, PMSTestSuite/library/
@ 2011-05-25 20:40 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2011-05-25 20:40 UTC (permalink / raw
  To: gentoo-commits

commit:     f5fcd755b2eab1f8efe7ae606e603fceab198acd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 25 20:21:43 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May 25 20:21:43 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=f5fcd755

Move library submodule into new location.

---
 .gitmodules                   |    4 ++--
 PMSTestSuite/library/standard |    1 +
 library                       |    1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index 7aa007a..ad1c13b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
-[submodule "library"]
-	path = library
+[submodule "PMSTestSuite/library/standard"]
+	path = PMSTestSuite/library/standard
 	url = http://git.overlays.gentoo.org/gitroot/proj/pms-test-suite-library.git

diff --git a/PMSTestSuite/library/standard b/PMSTestSuite/library/standard
new file mode 160000
index 0000000..145851a
--- /dev/null
+++ b/PMSTestSuite/library/standard
@@ -0,0 +1 @@
+Subproject commit 145851a384e3c667d2285802ac4311aaf7c07d76

diff --git a/library b/library
deleted file mode 160000
index 1015715..0000000
--- a/library
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 10157154a0489534d962573977b63de746eac662



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/pms-test-suite:master commit in: /, PMSTestSuite/library/
@ 2011-05-25 20:40 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2011-05-25 20:40 UTC (permalink / raw
  To: gentoo-commits

commit:     7aa200fe1275aa3fc0c6fca6f1c05ad2ff03c275
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 25 20:39:32 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May 25 20:39:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=7aa200fe

Sync the standard test library.

---
 PMSTestSuite/library/standard |    2 +-
 ebuild-generator              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/PMSTestSuite/library/standard b/PMSTestSuite/library/standard
index 145851a..a678eb2 160000
--- a/PMSTestSuite/library/standard
+++ b/PMSTestSuite/library/standard
@@ -1 +1 @@
-Subproject commit 145851a384e3c667d2285802ac4311aaf7c07d76
+Subproject commit a678eb23b92b05685552da6a09642d14fdc38972

diff --git a/ebuild-generator b/ebuild-generator
index f731180..a868aa4 100755
--- a/ebuild-generator
+++ b/ebuild-generator
@@ -16,7 +16,7 @@ def main(*argv):
 		return 1
 
 	repo_path = argv[1]
-	library_name = 'test'
+	library_name = 'standard'
 
 	try:
 		repo = EbuildRepository(repo_path)



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/pms-test-suite:master commit in: /, PMSTestSuite/library/
@ 2011-05-26  7:25 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2011-05-26  7:25 UTC (permalink / raw
  To: gentoo-commits

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/pms-test-suite:master commit in: /, PMSTestSuite/library/
@ 2011-05-31 18:10 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2011-05-31 18:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6ba0f29d2b1e641a4fa4a5b54dfbabf2a30d6529
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 31 18:04:41 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 31 18:04:41 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=6ba0f29d

Remove the standard library submodule.

---
 .gitmodules                   |    3 ---
 PMSTestSuite/library/standard |    1 -
 2 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index ad1c13b..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "PMSTestSuite/library/standard"]
-	path = PMSTestSuite/library/standard
-	url = http://git.overlays.gentoo.org/gitroot/proj/pms-test-suite-library.git

diff --git a/PMSTestSuite/library/standard b/PMSTestSuite/library/standard
deleted file mode 160000
index 1be532a..0000000
--- a/PMSTestSuite/library/standard
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 1be532a0d975ec2aebefc6e8bd6369b7b0e5146d



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-31 18:10 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox