[py-svn] r51699 - py/branch/event/py/test2

hpk at codespeak.net hpk at codespeak.net
Wed Feb 20 17:52:20 CET 2008


Author: hpk
Date: Wed Feb 20 17:52:20 2008
New Revision: 51699

Modified:
   py/branch/event/py/test2/collect.py
   py/branch/event/py/test2/item.py
Log:
rename collection tree base class to "Node". 


Modified: py/branch/event/py/test2/collect.py
==============================================================================
--- py/branch/event/py/test2/collect.py	(original)
+++ py/branch/event/py/test2/collect.py	Wed Feb 20 17:52:20 2008
@@ -35,10 +35,11 @@
         return self._config.getvalue(name, self.fspath) 
     return property(fget)
 
-class Base(object): 
-    """ base class for the nodes in the collection tree.  
-        Nodes with Children are "Collectors" and leaves
-        are the actual Test Items.  
+class Node(object): 
+    """ base class for Nodes in the collection tree.  
+        Nodes with Children are "Collectors" and 
+        leaves (without children) are runnable 
+        Test Items.  
     """
     def __init__(self, name, parent=None, config=None):
         self.name = name 
@@ -52,7 +53,7 @@
         return "<%s %r>" %(self.__class__.__name__, self.name) 
 
     def __eq__(self, other): 
-        if not isinstance(other, Base):
+        if not isinstance(other, Node):
             return False 
         return self.name == other.name and self.parent == other.parent 
     
@@ -63,7 +64,7 @@
         return not self == other
 
     def __cmp__(self, other): 
-        if not isinstance(other, Base):
+        if not isinstance(other, Node):
             return -1
         s1 = self._getsortvalue()
         s2 = other._getsortvalue()
@@ -164,7 +165,7 @@
         return traceback 
 
 
-class Collector(Base):
+class Collector(Node):
     """ 
         Collector instances generate children through 
         their listdir() and join() methods and thus 

Modified: py/branch/event/py/test2/item.py
==============================================================================
--- py/branch/event/py/test2/item.py	(original)
+++ py/branch/event/py/test2/item.py	Wed Feb 20 17:52:20 2008
@@ -1,5 +1,5 @@
 import py
-from py.__.test2.collect import FunctionMixin, Base
+from py.__.test2.collect import FunctionMixin, Node
 from py.__.test2 import present
 
 _dummy = object()
@@ -29,7 +29,7 @@
             col.setup() 
             self.stack.append(col) 
 
-class Item(Base): 
+class Item(Node): 
     def runtest(self):
         from py.__.test2.executor import getexecutor
         executor = getexecutor(self, self._config)


More information about the py-svn mailing list