Author: pjenvey
Date: 2008-12-19 17:05:47 -0700 (Fri, 19 Dec 2008)
New Revision: 3740
Modified:
FormEncode/trunk/formencode/htmlfill.py
FormEncode/trunk/formencode/validators.py
Log:
doctest fixes, sort of. doctest +NORMALIZE_WHITESPACE still hates the htmlfill
test
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2008-12-19 21:40:09 UTC (rev
3739)
+++ FormEncode/trunk/formencode/htmlfill.py 2008-12-20 00:05:47 UTC (rev
3740)
@@ -150,21 +150,23 @@
>>> parser.feed('<input type="text" name="name" value="fill">\
... <select name="occupation"><option value="">Default</option>\
... <option value="Crazy Cultist">Crazy cultist</option>\
- ... </select> <textarea cols=20 style="width: 100%" name="address">An
address\
+ ... </select> <textarea cols="20" style="width: 100%"
name="address">An address\
... </textarea> <input type="radio" name="living" value="yes">\
... <input type="radio" name="living" value="no">\
... <input type="checkbox" name="nice_guy" checked="checked">')
- >>> print parser.text()
+ >>> parser.close()
+ >>> print parser.text() # doctest: +NORMALIZE_WHITESPACE
<input type="text" name="name" value="Bob Jones">
<select name="occupation">
<option value="">Default</option>
<option value="Crazy Cultist" selected="selected">Crazy
cultist</option>
</select>
- <textarea cols=20 style="width: 100%" name="address">14 W. Canal
+ <textarea cols="20" style="width: 100%" name="address">14 W. Canal
New Guinea</textarea>
<input type="radio" name="living" value="yes">
- <input type="radio" name="living" value="no" selected="selected">
+ <input type="radio" name="living" value="no" checked="checked">
<input type="checkbox" name="nice_guy">
+
"""
default_encoding = 'utf8'
Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py 2008-12-19 21:40:09 UTC (rev
3739)
+++ FormEncode/trunk/formencode/validators.py 2008-12-20 00:05:47 UTC (rev
3740)
@@ -250,10 +250,10 @@
>>> wrap3 = Wrapper(validate_python=int)
>>> wrap3.to_python('1')
'1'
- >>> wrap3.to_python('a')
+ >>> wrap3.to_python('a') # doctest: +ELLIPSIS
Traceback (most recent call last):
...
- Invalid: invalid literal for int(): a
+ Invalid: invalid literal for int()...
"""
func_to_python = None
------------------------------------------------------------------------------
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs