On Jan 25, 5:36 pm, "Edward K. Ream" <[email protected]> wrote:
> I'm attempting to understand why various unit tests *do* fail with
> sitecustomize.py disabled.
All unit tests in unitTest.leo now pass with or without
sitecustomize.py calling sys.setdefaultencoding('utf-8').
There were several problems. First, g.toUnicode, g.toEncodedString
catch all exceptions. It appears risky to attempt to predict what
exceptions will be thrown. Second, the unit tests themselves must be
careful to to g.ue(aChar,'utf-8') rather than g.u(aChar).
A new unit test for _contentHashFile now passes "both ways", but only
after _contentHashFile takes care to convert both args to an encoded
string. Iirc, this may cause problems on ubuntu. We shall see.
Clearly, though, on Windows 7 the new code is essential, and fixes a
real bug: Non-ascii characters in file names probably would have
crashed _contentHashFile.
Thanks for your patience while we together exterminate these nasty
bugs.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.