[Checkins] SVN: zope.formlib/trunk/ Adapted tests for Python 2.4 (enforce sorting for short pprint output)
Zvezdan Petkovic
zvezdan at zope.com
Wed Mar 3 17:02:31 EST 2010
Log message for revision 109629:
Adapted tests for Python 2.4 (enforce sorting for short pprint output)
Changed:
U zope.formlib/trunk/CHANGES.txt
U zope.formlib/trunk/src/zope/formlib/form.txt
-=-
Modified: zope.formlib/trunk/CHANGES.txt
===================================================================
--- zope.formlib/trunk/CHANGES.txt 2010-03-03 21:49:24 UTC (rev 109628)
+++ zope.formlib/trunk/CHANGES.txt 2010-03-03 22:02:30 UTC (rev 109629)
@@ -2,11 +2,10 @@
Changes
=======
-4.X.X (unreleased)
+4.0.2 (unreleased)
==================
-- Adapted tests for Python 2.4 to 2.6
-- ...
+- Adapted tests for Python 2.4 (enforce sorting for short pprint output)
4.0.1 (2010-02-21)
==================
Modified: zope.formlib/trunk/src/zope/formlib/form.txt
===================================================================
--- zope.formlib/trunk/src/zope/formlib/form.txt 2010-03-03 21:49:24 UTC (rev 109628)
+++ zope.formlib/trunk/src/zope/formlib/form.txt 2010-03-03 22:02:30 UTC (rev 109629)
@@ -235,7 +235,8 @@
>>> request.form['form.min_size'] = u'42'
>>> request.form['form.max_size'] = u'142'
- >>> pprint(MyForm(None, request)()) # doctest: +NORMALIZE_WHITESPACE
+ >>> pprint(MyForm(None, request)(), width=1)
+ ... # doctest: +NORMALIZE_WHITESPACE
<input class="textType" id="form.name" name="form.name" size="20"
type="text" value="bob" />
<input class="textType" id="form.min_size" name="form.min_size" size="10"
@@ -311,7 +312,8 @@
If we display the form again, we'll get the same result:
- >>> pprint(MyForm(None, request)()) # doctest: +NORMALIZE_WHITESPACE
+ >>> pprint(MyForm(None, request)(), width=1)
+ ... # doctest: +NORMALIZE_WHITESPACE
<input class="textType" id="form.name" name="form.name" size="20"
type="text" value="bob" />
<input class="textType" id="form.min_size" name="form.min_size" size="10"
@@ -328,7 +330,8 @@
>>> request.form['form.min_size'] = u'42'
>>> request.form['form.max_size'] = u'14'
- >>> pprint(MyForm(None, request)()) # doctest: +NORMALIZE_WHITESPACE
+ >>> pprint(MyForm(None, request)(), width=1)
+ ... # doctest: +NORMALIZE_WHITESPACE
There were invariant errors:
Maximum is less than Minimum
<input class="textType" id="form.name" name="form.name" size="20"
@@ -345,7 +348,8 @@
>>> request.form['form.name'] = u''
- >>> pprint(MyForm(None, request)()) # doctest: +NORMALIZE_WHITESPACE
+ >>> pprint(MyForm(None, request)(), width=1)
+ ... # doctest: +NORMALIZE_WHITESPACE
There were field errors:
('name', u'Name', RequiredMissing('name'))
There were invariant errors:
@@ -538,7 +542,8 @@
>>> request.form['form.min_size'] = u'42'
>>> request.form['form.max_size'] = u'142'
>>> request.form['submit'] = u''
- >>> pprint(MyForm(order, request)()) # doctest: +NORMALIZE_WHITESPACE
+ >>> pprint(MyForm(order, request)(), width=1)
+ ... # doctest: +NORMALIZE_WHITESPACE
1
<input class="textType" id="form.name" name="form.name" size="20"
type="text" value="bob" />
@@ -563,7 +568,8 @@
Note, however, that if we submit the same request, we'll see that no
changes were applied:
- >>> pprint(MyForm(order, request)()) # doctest: +NORMALIZE_WHITESPACE
+ >>> pprint(MyForm(order, request)(), width=1)
+ ... # doctest: +NORMALIZE_WHITESPACE
1
<input class="textType" id="form.name" name="form.name" size="20"
type="text" value="bob" />
More information about the checkins
mailing list