Mercurial > pymonkey
comparison 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 |
comparison
equal
deleted
inserted
replaced
76:4cb89d48b068 | 77:755af0a94c94 |
---|---|
322 self.assertTrue(isinstance(obj, pymonkey.Function)) | 322 self.assertTrue(isinstance(obj, pymonkey.Function)) |
323 | 323 |
324 def testFunctionTypeCannotBeInstantiated(self): | 324 def testFunctionTypeCannotBeInstantiated(self): |
325 self.assertRaises(TypeError, pymonkey.Function) | 325 self.assertRaises(TypeError, pymonkey.Function) |
326 | 326 |
327 def testGetRuntimeWorks(self): | 327 def testObjectGetRuntimeWorks(self): |
328 rt = pymonkey.Runtime() | |
329 obj = rt.new_context().new_object() | |
330 self.assertEqual(obj.get_runtime(), rt) | |
331 | |
332 def testContextGetRuntimeWorks(self): | |
328 rt = pymonkey.Runtime() | 333 rt = pymonkey.Runtime() |
329 cx = rt.new_context() | 334 cx = rt.new_context() |
330 self.assertEqual(cx.get_runtime(), rt) | 335 self.assertEqual(cx.get_runtime(), rt) |
331 | 336 |
332 def testUndefinedCannotBeInstantiated(self): | 337 def testUndefinedCannotBeInstantiated(self): |