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

hpk at codespeak.net hpk at codespeak.net
Wed Feb 20 09:58:38 CET 2008


Author: hpk
Date: Wed Feb 20 09:58:37 2008
New Revision: 51670

Modified:
   py/branch/event/py/test2/collect.py
   py/branch/event/py/test2/item.py
Log:
generated Functions don't really need to care about sort order i think. 
the pseudo-support for ordering them was anyway broken and untested. 


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 09:58:37 2008
@@ -480,8 +480,8 @@
             call, args = self.getcallargs(x)
             if not callable(call): 
                 raise TypeError("yielded test %r not callable" %(call,))
-            name = "[%d]" % i
-            d[name] = self.Function(name, self, args, obj=call, sort_value = i)
+            name = "[%d]" % i  
+            d[name] = self.Function(name, self, args, callobj=call)
         return d
         
     def getcallargs(self, obj):

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 09:58:37 2008
@@ -50,12 +50,11 @@
         and executing a Python callable test object.
     """
     _state = SetupState()
-    def __init__(self, name, parent, args=(), obj=_dummy, sort_value = None):
+    def __init__(self, name, parent, args=(), callobj=_dummy):
         super(Function, self).__init__(name, parent) 
         self._args = args
-        if obj is not _dummy: 
-            self._obj = obj 
-        self._sort_value = sort_value
+        if callobj is not _dummy: 
+            self._obj = callobj 
 
     def run(self):
         """ setup and execute the underlying test function. """



More information about the pytest-commit mailing list