[Zope-CVS] CVS: Packages/pypes/pypes/tests - test_expression.py:1.3
Casey Duncan
casey at zope.com
Sat Jan 31 01:09:27 EST 2004
Update of /cvs-repository/Packages/pypes/pypes/tests
In directory cvs.zope.org:/tmp/cvs-serv25525/tests
Modified Files:
test_expression.py
Log Message:
Add helper function to compare ast nodes
=== Packages/pypes/pypes/tests/test_expression.py 1.2 => 1.3 ===
--- Packages/pypes/pypes/tests/test_expression.py:1.2 Sat Jan 31 00:23:31 2004
+++ Packages/pypes/pypes/tests/test_expression.py Sat Jan 31 01:09:26 2004
@@ -64,6 +64,14 @@
d = []
self.assertRaises(NameError, e)
+ def testNodesEqual(self):
+ from compiler import parse
+ from pypes.expression import nodesEqual
+ e1 = parse('x == 1', mode='eval')
+ e2 = parse('x >= 1', mode='eval')
+ self.failUnless(nodesEqual(e1, e1))
+ self.failIf(nodesEqual(e1, e2))
+
class WhiteTestExpression(unittest.TestCase):
"""Whitebox expression tests"""
More information about the Zope-CVS
mailing list