doctests failing on Centos 6 due to "unprintable" error objects
Original LP Author: Stephen A. Goss , LP Link: https://bugs.launchpad.net/bugs/826861
On Centos 6 (64 bit), the following tests fail due to what looks like some kind of Python object printing quirk with the version that ships with RHEL 6 and derivatives: src/mailman/model/docs/membership.txt src/mailman/model/docs/users.txt
The errors all look like this:
File "/home/sgoss/mailman_clone/src/mailman/model/docs/membership.txt", line 296, in membership.txt Failed example:
gwen_member.address = new_address
Differences (ndiff with -expected +actual):
Traceback (most recent call last):
- ...
- UnverifiedAddressError: gperson@example.com
+ File "/usr/lib64/python2.6/doctest.py", line 1248, in __run
+ compileflags, 1) in test.globs
+ File "<doctest membership.txt[68]>", line 1, in <module>
+ gwen_member.address = new_address
+ File "/home/sgoss/mailman_clone/src/mailman/model/member.py", line 116, in address
+ raise UnverifiedAddressError(new_address)
+ UnverifiedAddressError: <unprintable UnverifiedAddressError object>
The system reports Python version 2.6.5.
This error does not seem to occur with Python 2.7 on Ubuntu 11.04.
One possibility is that for some reason when it comes to printing out those error objects, Python doesn't have a default encoding scheme for representing the embedded unicode strings in that particular context (email address in the above example).