[Zope3-dev] str to unicode promotion test failures (with patch)
Osvaldo Santana
osantana at gmail.com
Wed Oct 13 00:12:01 EDT 2004
Hi,
I'm attaching a little patch to fix failures in zope.app.container tests.
I don't know if this is the correct solution for this problem but in
my Python is possible to promote a string with hi-bit-set characters
to unicode (charset Latin1/ISO8859-1):
---
Python 2.3.4 (#1, Aug 15 2004, 14:14:00)
[GCC 3.3.3 (release)] on linux-i386
>>> s = "A string with hi-bit-set characters: \700\701"
>>> unicode(s)
u'A string with hi-bit-set characters: \xc0\xc1'
---
This situation causes failures in BTrees tests too:
Error in test testBucketGet (BTrees.tests.test_compare.CompareTest)
Traceback (most recent call last):
File "/home/osvaldo/Zope3/src/BTrees/tests/test_compare.py", line 32, in setUp
self.assertRaises(UnicodeError, unicode, self.s)
File "/usr/lib/python2.3/unittest.py", line 295, in failUnlessRaises
raise self.failureException, excName
AssertionError: UnicodeError
:
Thanks,
Osvaldo
--
Osvaldo Santana Neto (aCiDBaSe)
icq, url = (11287184, "http://www.pythonbrasil.com.br")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zope3-fix_contained.patch
Type: text/x-patch
Size: 425 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20041013/0cd5c581/zope3-fix_contained.bin
More information about the Zope3-dev
mailing list