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

hpk at codespeak.net hpk at codespeak.net
Sun Jul 20 18:34:48 CEST 2008


Author: hpk
Date: Sun Jul 20 18:34:47 2008
New Revision: 56691

Modified:
   py/branch/event/py/test2/collect.py
Log:
better naming for when this appears in tracebacks


Modified: py/branch/event/py/test2/collect.py
==============================================================================
--- py/branch/event/py/test2/collect.py	(original)
+++ py/branch/event/py/test2/collect.py	Sun Jul 20 18:34:47 2008
@@ -416,9 +416,9 @@
         else: 
             name = 'setup_function' 
         obj = self.parent.obj 
-        meth = getattr(obj, name, None)
-        if meth is not None: 
-            return meth(self.obj) 
+        setup_func_or_method = getattr(obj, name, None)
+        if setup_func_or_method is not None: 
+            return setup_func_or_method(self.obj) 
 
     def teardown(self): 
         """ perform teardown for this test function. """
@@ -427,9 +427,9 @@
         else: 
             name = 'teardown_function' 
         obj = self.parent.obj 
-        meth = getattr(obj, name, None)
-        if meth is not None: 
-            return meth(self.obj) 
+        teardown_func_or_meth = getattr(obj, name, None)
+        if teardown_func_or_meth is not None: 
+            return teardown_func_or_meth(self.obj) 
 
     def prunetraceback(self, traceback):
         if not self._config.option.fulltrace: 



More information about the pytest-commit mailing list