On Thu, Feb 4, 2010 at 2:04 AM, zpcspm <[email protected]> wrote: > Thank you, Edward.
You're welcome. Finding this bug was fun. > Now that unit tests work, I'm suggesting a simple regression test for > unicode issues that happened in the past. Done at rev 2868 of the trunk, in @test koi8-r in unitTest.leo. I made two changes: 1. 'unicode' is defined only for Python 2.x. For Python 3.x the code asserts g.isUnicode(s) Imo it is correct to bypass g.toUnicode as you did, so that we are testing only one thing at a time. Otherwise offsetting bugs could cancel the test. 2. self.assertEqual only works for an actual unit test. I prefer using plain a plain assert so that the script can also be run as a script. YMMV. 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.
