Mercurial > pymonkey
annotate test_pymonkey.py @ 2:2f6bdc9f7245
pymonkey.evaluate() now returns a python-ized version of the JS return value, though it only supports integers at the moment.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 28 Jun 2009 12:26:46 -0700 |
parents | 21aa6e3abb49 |
children | d6a0819ca6ca |
rev | line source |
---|---|
0 | 1 import unittest |
2 import pymonkey | |
3 | |
4 class PymonkeyTests(unittest.TestCase): | |
5 def test_evaluate(self): | |
2
2f6bdc9f7245
pymonkey.evaluate() now returns a python-ized version of the JS return value, though it only supports integers at the moment.
Atul Varma <varmaa@toolness.com>
parents:
0
diff
changeset
|
6 self.assertEqual(pymonkey.evaluate('1+3', '<string>', 1), |
2f6bdc9f7245
pymonkey.evaluate() now returns a python-ized version of the JS return value, though it only supports integers at the moment.
Atul Varma <varmaa@toolness.com>
parents:
0
diff
changeset
|
7 4) |
0 | 8 |
9 if __name__ == '__main__': | |
10 unittest.main() |