changeset 569:0d19b3f6d2fc pytest2

condition added in MoinTestFunction.setup to avoid the errors temporarily due to hack made
author pkumar <contactprashantat@gmail.com>
date Wed, 01 Jun 2011 17:16:16 +0530
parents 1ea65bb705e6
children 964a9744310c
files MoinMoin/conftest.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/conftest.py	Wed Jun 01 17:06:08 2011 +0530
+++ b/MoinMoin/conftest.py	Wed Jun 01 17:16:16 2011 +0530
@@ -70,7 +70,8 @@
 
         super(MoinTestFunction, self).setup()
         #XXX: hack till we get better funcarg tools
-        self._obj.im_self.app = self.app
+        if hasattr(self._obj, 'im_self'):
+            self._obj.im_self.app = self.app
 
     def teardown(self):
         super(MoinTestFunction, self).teardown()