diff test_pymonkey.py @ 9:032cfc448079

Added pymonkey.Runtime and pymonkey.Context as new types.
author Atul Varma <varmaa@toolness.com>
date Sun, 28 Jun 2009 17:07:15 -0700
parents 6647870380cc
children ca17531e8c81
line wrap: on
line diff
--- a/test_pymonkey.py	Sun Jun 28 13:32:46 2009 -0700
+++ b/test_pymonkey.py	Sun Jun 28 17:07:15 2009 -0700
@@ -2,6 +2,13 @@
 import pymonkey
 
 class PymonkeyTests(unittest.TestCase):
+    def testJSRuntimeWorks(self):
+        rt = pymonkey.Runtime()
+        cx = rt.new_context()
+        self.assertRaises(TypeError, pymonkey.Context)
+        self.assertTrue(isinstance(cx, pymonkey.Context))
+        self.assertEqual(cx.get_runtime(), rt)
+
     def testUndefinedCannotBeInstantiated(self):
         self.assertRaises(TypeError, pymonkey.undefined)