comparison test_pymonkey.py @ 13:ca17531e8c81

Added an object class.
author Atul Varma <varmaa@toolness.com>
date Sun, 28 Jun 2009 18:19:14 -0700
parents 032cfc448079
children 9edcdb4ab12d
comparison
equal deleted inserted replaced
12:6d95cfaa1e0b 13:ca17531e8c81
6 rt = pymonkey.Runtime() 6 rt = pymonkey.Runtime()
7 cx = rt.new_context() 7 cx = rt.new_context()
8 self.assertRaises(TypeError, pymonkey.Context) 8 self.assertRaises(TypeError, pymonkey.Context)
9 self.assertTrue(isinstance(cx, pymonkey.Context)) 9 self.assertTrue(isinstance(cx, pymonkey.Context))
10 self.assertEqual(cx.get_runtime(), rt) 10 self.assertEqual(cx.get_runtime(), rt)
11
12 obj = cx.new_object()
13 self.assertRaises(TypeError, pymonkey.Object)
14 self.assertTrue(isinstance(obj, pymonkey.Object))
11 15
12 def testUndefinedCannotBeInstantiated(self): 16 def testUndefinedCannotBeInstantiated(self):
13 self.assertRaises(TypeError, pymonkey.undefined) 17 self.assertRaises(TypeError, pymonkey.undefined)
14 18
15 def testEvaluateReturnsUndefined(self): 19 def testEvaluateReturnsUndefined(self):