changeset 566:b759201f2812 pytest2

condition added in MoinTestFunction.setup() to check for the class in conftest.py
author pkumar <contactprashantat@gmail.com>
date Wed, 01 Jun 2011 16:17:51 +0530
parents 50239292c3ad
children 9feca3bb9395
files MoinMoin/conftest.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/conftest.py	Wed Jun 01 00:44:15 2011 +0530
+++ b/MoinMoin/conftest.py	Wed Jun 01 16:17:51 2011 +0530
@@ -91,7 +91,8 @@
 
 class MoinTestFunction(pytest.collect.Function):
     def setup(self):
-        cls = self.obj
+        if inspect.isclass(self.parent.obj.__class__):
+            cls = self.parent.obj.__class__
         if hasattr(cls, 'Config'):
             given_config = cls.Config
         else: