Mercurial > pymonkey
comparison test_pymonkey.py @ 94:c66d7da09c95
Tweaked a test to also ensure that context.get_property() can take unicode or strings.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sat, 15 Aug 2009 00:25:48 -0700 |
parents | d2891ca1b89c |
children | 0701aee1b0cd |
comparison
equal
deleted
inserted
replaced
93:3beb55bedd92 | 94:c66d7da09c95 |
---|---|
340 cx.init_standard_classes(obj) | 340 cx.init_standard_classes(obj) |
341 cx.evaluate_script(obj, 'var foo = {bar: 1}', '<string>', 1) | 341 cx.evaluate_script(obj, 'var foo = {bar: 1}', '<string>', 1) |
342 self.assertTrue(isinstance(cx.get_property(obj, u"foo"), | 342 self.assertTrue(isinstance(cx.get_property(obj, u"foo"), |
343 pymonkey.Object)) | 343 pymonkey.Object)) |
344 self.assertTrue(cx.get_property(obj, u"foo") is | 344 self.assertTrue(cx.get_property(obj, u"foo") is |
345 cx.get_property(obj, u"foo")) | 345 cx.get_property(obj, "foo")) |
346 | 346 |
347 def testObjectGetattrThrowsException(self): | 347 def testObjectGetattrThrowsException(self): |
348 cx = pymonkey.Runtime().new_context() | 348 cx = pymonkey.Runtime().new_context() |
349 obj = cx.new_object() | 349 obj = cx.new_object() |
350 cx.init_standard_classes(obj) | 350 cx.init_standard_classes(obj) |