[Python-Dev] Regexp 2.7
Terry Reedy
tjreedy at udel.edu
Tue Mar 10 21:45:27 CET 2009
Jared Grubb wrote:
> I'm not criticizing the current battery of tests, nor am I arguing that
> we replace them.
>
> There's a comment in the test_re.py that says that "these tests were
> carefully modeled to cover most of the code"... That is a very difficult
> statement to maintain and/or verify, especially if the library gets a
> major revision (which it appears the original post's patch is).
>
> PCRE has _thousands_ of detailed regular expression tests, testing
> everything from matching to parsing to extended regular expression
> syntax to encoding and locales. (It's been a while since I've looked at
> the details, but of course there are tests that dont apply to Python's
> implmentation.)
>
> So, if there's interest in investigating how much of the PCRE tests can
> augment the existing tests, I am offering to do so. (I already did a
> simple translation utility to parse the PCRE test format into something
> we could use in the PyPy test suite; I could try to do something similar
> for test_re, if there's interest).
There is a conflict between running a thorough test of everything
possible and not having the test suite run for hours. I believe a
couple of other modules have a regular sanity-check test and an extended
patch-check test. Something like that might be appropriate for re.
More information about the Python-Dev
mailing list