[issue3979] Doctest failing when it should pass
J. Pablo Fernández
report at bugs.python.org
Fri Sep 26 21:55:54 CEST 2008
New submission from J. Pablo Fernández <pupeno at pupeno.com>:
The attached file contains a function and two tests for it which are
essentially the same. One is a doctest and the other is a TestCase. The
doctest fails and I believe it shouldn't.
Here's what I get:
$ python failingdoctest.py
**********************************************************************
File "../../provizora/failingdoctest.py", line 8, in __main__._to_xsistemo
Failed example:
_to_xsistemo(u"ĈĉĜĝĤĥĴĵŜŝŬŭ")
Expected:
'CxcxGxgxHxhxJxjxSxsxUxux'
Got:
"u'\\xc4\\x88\\xc4\\x89\\xc4\\x9c\\xc4\\x9d\\xc4\\xa4\\xc4\\xa5\\xc4\\xb4\\xc4\\xb5\\xc5\\x9c\\xc5\\x9d\\xc5\\xac\\xc5\\xad'"
**********************************************************************
1 items had failures:
1 of 1 in __main__._to_xsistemo
***Test Failed*** 1 failures.
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
Thank you.
----------
components: Library (Lib)
files: failingdoctest.py
messages: 73882
nosy: pupeno
severity: normal
status: open
title: Doctest failing when it should pass
versions: Python 2.5
Added file: http://bugs.python.org/file11624/failingdoctest.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3979>
_______________________________________
More information about the Python-bugs-list
mailing list