Mercurial > pymonkey
comparison tests/test_pymonkey.py @ 147:ebc0ff767290
Ensure that get_stack() returns None if the stack is empty.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sat, 29 Aug 2009 13:18:40 -0700 |
parents | b1cf9decc36f |
children | 9ac6adc6304b |
comparison
equal
deleted
inserted
replaced
146:b1cf9decc36f | 147:ebc0ff767290 |
---|---|
45 self.assertRaises(pymonkey.error, run, '5f') | 45 self.assertRaises(pymonkey.error, run, '5f') |
46 self.assertEqual( | 46 self.assertEqual( |
47 self.last_exception.args[1], | 47 self.last_exception.args[1], |
48 u'SyntaxError: missing ; before statement' | 48 u'SyntaxError: missing ; before statement' |
49 ) | 49 ) |
50 | |
51 def testGetStackOnEmptyStackReturnsNone(self): | |
52 cx = pymonkey.Runtime().new_context() | |
53 self.assertEqual(cx.get_stack(), None) | |
50 | 54 |
51 def testGetStackWorks(self): | 55 def testGetStackWorks(self): |
52 stack_holder = [] | 56 stack_holder = [] |
53 | 57 |
54 def func(cx, this, args): | 58 def func(cx, this, args): |