Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : proto/python-efl

Dir     : e17/proto/python-efl/python-evas/tests


Modified Files:
        01-canvas-basics.py 02-object-basics.py 


Log Message:
Fix way to get the address of python objects.

Cython changed the way casts are interpreted some time ago and
<unsigned long>object is not valid anymore because it would check for
an integer-capable object (ie: __init__()).

Instead we must make it a void pointer (<void *>object) and then cast
this to the integer type.


===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/tests/01-canvas-basics.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- 01-canvas-basics.py 19 Jul 2007 16:07:07 -0000      1.2
+++ 01-canvas-basics.py 10 Aug 2008 14:59:12 -0000      1.3
@@ -16,6 +16,8 @@
         self.assertEqual(c.output_method_get(), evas.render_method_lookup(m))
         self.assertEqual(c.size_get(), s)
         self.assertEqual(c.viewport_get(), v)
+        self.assertEqual(isinstance(str(c), str), True)
+        self.assertEqual(isinstance(repr(c), str), True)
 
 
 class CanvasMethods(unittest.TestCase):
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/tests/02-object-basics.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- 02-object-basics.py 19 Jul 2007 16:07:07 -0000      1.2
+++ 02-object-basics.py 10 Aug 2008 14:59:12 -0000      1.3
@@ -99,6 +99,14 @@
         o2 = self.canvas.object_name_find("Test 123")
         self.assertEqual(o1, o2)
 
+    def testStr(self):
+        o = evas.Rectangle(self.canvas)
+        self.assertEqual(isinstance(str(o), str), True)
+
+    def testRepr(self):
+        o = evas.Rectangle(self.canvas)
+        self.assertEqual(isinstance(repr(o), str), True)
+
 
 
 class ObjectProperties(unittest.TestCase):



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to