[conduit: 11/138] More..
- From: John Carr <johncarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [conduit: 11/138] More..
- Date: Thu, 21 May 2009 03:27:52 -0400 (EDT)
commit 11ab87047a7d380985c3795191fbc1a9951ed8b6
Author: John Carr <john carr unrouted co uk>
Date: Mon Apr 20 01:32:18 2009 -0700
More..
---
test/soup/test_dataprovider.py | 6 ++----
test/soup/test_synchronization.py | 30 ++++++++++++------------------
2 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/test/soup/test_dataprovider.py b/test/soup/test_dataprovider.py
index 4c501d5..26011fb 100644
--- a/test/soup/test_dataprovider.py
+++ b/test/soup/test_dataprovider.py
@@ -1,10 +1,7 @@
-import unittest
-
import soup
def make_testcase(dp):
class TestDataprovider(soup.TestCase):
-
dataprovider = dp
def test_add(self):
@@ -27,9 +24,10 @@ def make_testcase(dp):
return TestDataprovider
+
from soup.modules import folder
TestDataproviderFolder = make_testcase(folder.FolderWrapper)
if __name__ == "__main__":
+ import unittest
unittest.main()
-
diff --git a/test/soup/test_synchronization.py b/test/soup/test_synchronization.py
index cca9c9f..1fdaec9 100644
--- a/test/soup/test_synchronization.py
+++ b/test/soup/test_synchronization.py
@@ -1,25 +1,19 @@
-import unittest
-
import soup
-class TestSynchronizationPair(soup.TestCase):
-
- def __init__(self, source, sink):
- super(TestSynchronizationPair, self).__init__(self)
- self.source = source
- self.sink = sink
+def make_testcase(src, snk):
+ class TestSynchronization(soup.TestCase):
+ source = src
+ sink = snk
- def testDoNothing(self):
- pass
+ def testDoNothing(self):
+ pass
-class TestSynchronization(unittest.TestSuite):
+ return TestSynchronization
- def __init__(self, tests=None):
- """ Generate TestSuite for all module wrapper pairs """
- tests = []
- for a in soup.modules.all():
- for b in soup.modules.all():
- tests.append(TestSynchronizationPair(a, b))
- super(TestSynchronization, self).__init__(tests)
+from soup.modules import folder
+TestSynchronizationFolderFolder = make_testcase(folder.FolderWrapper, folder.FolderWrapper)
+if __name__ == "__main__":
+ import unittest
+ unittest.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]