[Zope-CVS] CVS: Packages/pypes/pypes/tests -
test_expression.py:1.15 test_query.py:1.17
Casey Duncan
casey at zope.com
Sat Nov 27 17:17:50 EST 2004
Update of /cvs-repository/Packages/pypes/pypes/tests
In directory cvs.zope.org:/tmp/cvs-serv14841/pypes/tests
Modified Files:
test_expression.py test_query.py
Log Message:
Fix failing str and repr test for expressions
Replace deprecated zope.interface.isImplemented by with providedBy
=== Packages/pypes/pypes/tests/test_expression.py 1.14 => 1.15 ===
--- Packages/pypes/pypes/tests/test_expression.py:1.14 Fri Jul 23 01:03:09 2004
+++ Packages/pypes/pypes/tests/test_expression.py Sat Nov 27 17:17:50 2004
@@ -47,8 +47,10 @@
def testExprStrAndRepr(self):
s = 'yum + yum'
- self.assertEqual(str(self.expr_factory(s)), "Expression('%s')" % s)
- self.assertEqual(repr(self.expr_factory(s)), "Expression('%s')" % s)
+ self.assertEqual(str(self.expr_factory(s)),
+ "%s('%s')" % (self.expr_factory.__name__, s))
+ self.assertEqual(repr(self.expr_factory(s)),
+ "%s('%s')" % (self.expr_factory.__name__, s))
def testExprWithStatementsRaises(self):
self.assertRaises(SyntaxError, self.expr_factory, 'def x(): pass')
=== Packages/pypes/pypes/tests/test_query.py 1.16 => 1.17 ===
--- Packages/pypes/pypes/tests/test_query.py:1.16 Thu Jul 1 23:18:56 2004
+++ Packages/pypes/pypes/tests/test_query.py Sat Nov 27 17:17:50 2004
@@ -193,7 +193,7 @@
def test_select_returns_IQueryResult(self):
from pypes.interfaces import IQueryResult
- self.failUnless(IQueryResult.isImplementedBy(self.query.select()))
+ self.failUnless(IQueryResult.providedBy(self.query.select()))
def test_select_without_args_outputs_all(self):
result = self.query.select()
More information about the Zope-CVS
mailing list