[Checkins] SVN: zope.schema/trunk/ Made validation tests compatible with Python 2.5 again (hopefully not
Shane Hathaway
shane at hathawaymix.org
Mon Feb 2 23:52:06 EST 2009
Log message for revision 96012:
Made validation tests compatible with Python 2.5 again (hopefully not
breaking Python 2.4)
Changed:
U zope.schema/trunk/CHANGES.txt
U zope.schema/trunk/src/zope/schema/_bootstrapinterfaces.py
U zope.schema/trunk/src/zope/schema/validation.txt
-=-
Modified: zope.schema/trunk/CHANGES.txt
===================================================================
--- zope.schema/trunk/CHANGES.txt 2009-02-03 02:16:09 UTC (rev 96011)
+++ zope.schema/trunk/CHANGES.txt 2009-02-03 04:52:05 UTC (rev 96012)
@@ -5,7 +5,8 @@
3.5.2 (unreleased)
------------------
-- ...
+- Made validation tests compatible with Python 2.5 again (hopefully not
+ breaking Python 2.4)
3.5.1 (2009/01/31)
------------------
Modified: zope.schema/trunk/src/zope/schema/_bootstrapinterfaces.py
===================================================================
--- zope.schema/trunk/src/zope/schema/_bootstrapinterfaces.py 2009-02-03 02:16:09 UTC (rev 96011)
+++ zope.schema/trunk/src/zope/schema/_bootstrapinterfaces.py 2009-02-03 04:52:05 UTC (rev 96012)
@@ -39,7 +39,8 @@
return cmp(self.args, other.args)
def __repr__(self):
- return '%s(%s)' % (self.__class__.__name__, ', '.join(repr(arg) for arg in self.args))
+ return '%s(%s)' % (self.__class__.__name__,
+ ', '.join(repr(arg) for arg in self.args))
class RequiredMissing(ValidationError):
__doc__ = _("""Required input is missing.""")
Modified: zope.schema/trunk/src/zope/schema/validation.txt
===================================================================
--- zope.schema/trunk/src/zope/schema/validation.txt 2009-02-03 02:16:09 UTC (rev 96011)
+++ zope.schema/trunk/src/zope/schema/validation.txt 2009-02-03 04:52:05 UTC (rev 96012)
@@ -37,8 +37,8 @@
>>> ti = TwoInts()
>>> r = zope.schema.getValidationErrors(ITwoInts, ti)
>>> r
- [('a', SchemaNotFullyImplemented(<exceptions.AttributeError instance at 0x...>)),
- ('b', SchemaNotFullyImplemented(<exceptions.AttributeError instance at 0x...>))]
+ [('a', SchemaNotFullyImplemented(...AttributeError...)),
+ ('b', SchemaNotFullyImplemented(...AttributeError...))]
>>> r[0][1].args[0].args
("'TwoInts' object has no attribute 'a'",)
>>> r[1][1].args[0].args
@@ -48,8 +48,8 @@
>>> r = zope.schema.getSchemaValidationErrors(ITwoInts, ti)
>>> r
- [('a', SchemaNotFullyImplemented(<exceptions.AttributeError instance at 0x...>)),
- ('b', SchemaNotFullyImplemented(<exceptions.AttributeError instance at 0x...>))]
+ [('a', SchemaNotFullyImplemented(...AttributeError...)),
+ ('b', SchemaNotFullyImplemented(...AttributeError...))]
>>> r[0][1].args[0].args
("'TwoInts' object has no attribute 'a'",)
>>> r[1][1].args[0].args
@@ -64,7 +64,7 @@
>>> errors = zope.schema.getValidationErrors(ITwoInts, ti)
>>> errors
[('a', TooBig(11, 10)),
- ('b', SchemaNotFullyImplemented(<exceptions.AttributeError instance at 0x...>))]
+ ('b', SchemaNotFullyImplemented(...AttributeError...))]
>>> errors[1][1].args[0].args
("'TwoInts' object has no attribute 'b'",)
@@ -78,7 +78,7 @@
>>> ti.a = 8
>>> r = zope.schema.getValidationErrors(ITwoInts, ti)
>>> r
- [('b', SchemaNotFullyImplemented(<exceptions.AttributeError instance at 0x...>))]
+ [('b', SchemaNotFullyImplemented(...AttributeError...))]
>>> r[0][1].args[0].args
("'TwoInts' object has no attribute 'b'",)
More information about the Checkins
mailing list