A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-September/009156.html below:

[Python-Dev] failure in test_sre???

[Python-Dev] failure in test_sre???Tim Peters tim_one@email.msn.com
Sun, 3 Sep 2000 04:25:38 -0400
> [Mark Favas, on new test_sre failures]
> > Is it just me, or is test_sre meant to fail, following the recent
> > changes to _sre.c?

I just checked in a fix for this.  /F also implemented PEP 223, and it had a
surprising consequece for test_sre!  There were three test lines (in a loop,
that's why you got so many failures) of the form:

    test(r"""sre.match("\x%02x" % i, chr(i)) != None""", 1)

Note the

    "\x%02x"

part.  Before PEP 223, that "expanded" to itself:

    "\x%02x"

because the damaged \x escape was ignored.  After PEP223, it raised the

    ValueError: invalid \x escape

you kept seeing.  The fix was merely to change these 3 lines to use, e.g.,

    r"\x%02x"

instead.  Pattern strings should usually be r-strings anyway.





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4