Mercurial > pymonkey
diff test_pymonkey.py @ 89:e77bc7c799e8
JS runtime mismatches are now checked for and enforced so they won't cause segfaults.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 09 Aug 2009 22:54:15 -0700 |
parents | 0b2970e8cd67 |
children | d2891ca1b89c |
line wrap: on
line diff
--- a/test_pymonkey.py Sun Aug 09 22:26:45 2009 -0700 +++ b/test_pymonkey.py Sun Aug 09 22:54:15 2009 -0700 @@ -498,6 +498,16 @@ self.last_exception.message), 'ReferenceError: blarg is not defined') + def testInitStandardClassesRaisesExcOnRuntimeMismatch(self): + cx2 = pymonkey.Runtime().new_context() + cx = pymonkey.Runtime().new_context() + obj = cx.new_object() + self.assertRaises(ValueError, + cx2.init_standard_classes, + obj) + self.assertEqual(self.last_exception.message, + 'JS runtime mismatch') + def testCallFunctionWorks(self): cx = pymonkey.Runtime().new_context() obj = cx.new_object()