I have figured out what is the problem with test 6. Python documentation says "When the UNICODE flag is not specified, matches any decimal digit". Character ² [1] is technically not a decimal digit (Unicode category Nd) as it belongs to category No (Number, other). I suggest we replace the unicode digits in the test with those from the Nd category[2].
[1] http://www.fileformat.info/info/unicode/char/00b2/index.htm [2] http://www.fileformat.info/info/unicode/category/Nd/list.htm On Sat, May 25, 2013 at 9:15 AM, Olemis Lang <[email protected]> wrote: > On 5/24/13, Anze Staric <[email protected]> wrote: >> > [...] >> >> If we ignore the tests that were failing because of the moved icon, we >> are still left with 6 failing tests on python 2.7 (5 on python 2.6.). >> >> Two are probably osx specific: >> > [...] >> >> 4. FAIL: test (tests.wiki.formatter.ProductWikiTestCase) >> Test Another arbitrary protocol Link >> > > ... this one is a well known failure mode highlighting backwards > incompatibility of JIRA compact ticket syntax . > > [...] >> >> The test failing on 2.7 but not on 2.6 is >> 6. FAIL: test (tests.wiki.formatter.ProductWikiTestCase) >> Test product: links - JIRA syntax with unicode digits >> > [...] >> >> 6. The last test tries to match T-²⁰⁴¹ (unicode numbers) with the >> regexp that simplifies to T-d+ (multiproduct/api.py:646 for exact >> regexp), which fails in python 2.7. If this is something we want to >> support, > > This is a test case borrowed from Trac test suite . Supported or not , > IMHO this is a valid input so either success or failure should be > asserted ; but more important afaict is the fact that it will behave > exactly the same running different versions of Python . > >> does anyone knows a way to fix this regular expression? > > hmmm ... maybe related to this ? > > http://stackoverflow.com/questions/6309387/regular-expressions-python-error-with-unicode-difference-with-sub-vs-findall > > >> Even >> if it matches, can we get the ticket by unicode representation of its >> id? >> > > Documented in expected test result . That's exactly what this test > case is for ;) > > -- > Regards, > > Olemis.
