Mercurial > pymonkey
diff test_pymonkey.py @ 77:755af0a94c94
Added a pymonkey.Object.get_runtime() method.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 07 Aug 2009 11:20:12 -0700 |
parents | 4cb89d48b068 |
children | 99138265d4b9 |
line wrap: on
line diff
--- a/test_pymonkey.py Fri Aug 07 11:02:56 2009 -0700 +++ b/test_pymonkey.py Fri Aug 07 11:20:12 2009 -0700 @@ -324,7 +324,12 @@ def testFunctionTypeCannotBeInstantiated(self): self.assertRaises(TypeError, pymonkey.Function) - def testGetRuntimeWorks(self): + def testObjectGetRuntimeWorks(self): + rt = pymonkey.Runtime() + obj = rt.new_context().new_object() + self.assertEqual(obj.get_runtime(), rt) + + def testContextGetRuntimeWorks(self): rt = pymonkey.Runtime() cx = rt.new_context() self.assertEqual(cx.get_runtime(), rt)