[PyObjC-svn] r2131 - trunk/pyobjc/pyobjc-core/Lib/objc/test

[email protected]
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Sat Apr  4 14:52:00 2009
New Revision: 2131

Log:
Bug mentioned by [email protected] on pyobjc-dev.


Modified:
   trunk/pyobjc/pyobjc-core/Lib/objc/test/test_subclass.py

Modified: trunk/pyobjc/pyobjc-core/Lib/objc/test/test_subclass.py
==============================================================================
--- trunk/pyobjc/pyobjc-core/Lib/objc/test/test_subclass.py	(original)
+++ trunk/pyobjc/pyobjc-core/Lib/objc/test/test_subclass.py	Sat Apr  4 14:52:00 2009
@@ -416,6 +416,17 @@
         self.assert_(not b)
         self.assertEquals(lst, ['init', 'alloc'])
 
+    def testImplementingSetValueForKey(self):
+        values = {}
+        class CrashTest(NSObject):
+            def setValue_forKey_(self, v, k):
+                values[k] = v
+
+        o = CrashTest.alloc().init()
+        o.setValue_forKey_(42,"key")
+
+        self.failUnlessEqual(values, {"key":42})
+
 
 if __name__ == '__main__':
     main()

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.