from timeside.component import *
+from timeside.tests import TestCase, TestRunner
import unittest
-class TestComponentArchitecture(unittest.TestCase):
-
- def assertSameList(self, list1, list2):
- if len(list1) != len(list2):
- self.fail("Lists length differ : %d != %d" % (len(list1), len(list2)))
-
- for item in list1:
- if not item in list2:
- self.fail("%s is not in list2" % str(item))
-
- for item in list2:
- if not item in list1:
- self.fail("%s is not in list1" % str(item))
-
+__all__ = ['TestComponentArchitecture']
+class TestComponentArchitecture(TestCase):
+ "Test the component and interface system"
+
def testOneInterface(self):
"Test a component implementing one interface"
self.assertSameList(implementations(I1), [C1])
except ComponentError:
pass
+
class I1(Interface):
pass
implements(I11)
if __name__ == '__main__':
- unittest.main()
+ unittest.main(testRunner=TestRunner())