[Zope3-checkins] SVN: Zope3/branches/srichter-blow-services/src/zope/component/ Moved adapts() to right interface. Improved a test setup.

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Dec 23 17:43:11 EST 2004


Log message for revision 28699:
  Moved adapts() to right interface. Improved a test setup.
  

Changed:
  U   Zope3/branches/srichter-blow-services/src/zope/component/interfaces.py
  U   Zope3/branches/srichter-blow-services/src/zope/component/tests.py

-=-
Modified: Zope3/branches/srichter-blow-services/src/zope/component/interfaces.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/component/interfaces.py	2004-12-23 21:59:10 UTC (rev 28698)
+++ Zope3/branches/srichter-blow-services/src/zope/component/interfaces.py	2004-12-23 22:43:11 UTC (rev 28699)
@@ -225,7 +225,14 @@
         and this adapter's 'Adapters' service is used.
         """
 
+    def adapts(*interfaces):
+        """Declare that a class adapts the given interfaces.
 
+        This function can only be used in a class definition.
+
+        (TODO, allow classes to be passed as well as interfaces.)
+        """
+
     # Factory service
 
     # TODO: Hard to make context a keyword, leaving as it is. Maybe we should
@@ -292,14 +299,6 @@
         required objects.
         """
 
-    def adapts(*interfaces):
-        """Declare that a class adapts the given interfaces.
-
-        This function can only be used in a class definition.
-
-        (TODO, allow classes to be passed as well as interfaces.)
-        """
-
     def queryUtility(interface, name='', default=None):
         """Look up a utility that provides an interface.
 

Modified: Zope3/branches/srichter-blow-services/src/zope/component/tests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/component/tests.py	2004-12-23 21:59:10 UTC (rev 28698)
+++ Zope3/branches/srichter-blow-services/src/zope/component/tests.py	2004-12-23 22:43:11 UTC (rev 28699)
@@ -576,4 +576,4 @@
         ))
 
 if __name__ == "__main__":
-    unittest.TextTestRunner().run(test_suite())
+    unittest.main(defaultTest='test_suite')



More information about the Zope3-Checkins mailing list