diff test_pymonkey.py @ 32:abf14cba9ef5

JS wrapped Python functions can now return floats.
author Atul Varma <varmaa@toolness.com>
date Tue, 30 Jun 2009 22:37:00 -0700
parents d0a3f358072a
children 5d3d3b25f23f
line wrap: on
line diff
--- a/test_pymonkey.py	Tue Jun 30 22:28:04 2009 -0700
+++ b/test_pymonkey.py	Tue Jun 30 22:37:00 2009 -0700
@@ -28,6 +28,12 @@
         self.assertEqual(self._evalJsWrappedPyFunc(hai2u, 'hai2u()'),
                          5)
 
+    def testJsWrappedPythonFunctionReturnsFloat(self):
+        def hai2u():
+            return 5.1
+        self.assertEqual(self._evalJsWrappedPyFunc(hai2u, 'hai2u()'),
+                         5.1)
+
     def testJsWrappedPythonFunctionReturnsNegativeInt(self):
         def hai2u():
             return -5