[Python-Dev] New test failure on Windows (original) (raw)
Gary Herron gherron@islandtraining.com
Thu, 24 Apr 2003 16:33:50 -0700
- Previous message: [Python-Dev] New test failure on Windows
- Next message: [Python-Dev] New test failure on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
There's a bit more to this problem. It has to do with the sre test versus the re tests. When test_sre is run, it claims to run all its own tests as well as all of test_re. However any failed tests in test_re are not reported by test_sre. (Neither the one found by Tim nor any others I just purposely introduced into test_re.) This is clearly a problem with test_sre. Only if you run test_re directly rather than through test_sre do you see Tim's error.
I'm hoping that Skip, who made these changes, can fix them. (BTW, I like the idea of putting all these tests into unittest -- the old test code looked like a cancer of multiple test methods grown on top of each other.)
Gary Herron
On Thursday 24 April 2003 03:38 pm, Gary Herron wrote:
On Thursday 24 April 2003 03:01 pm, Tim Peters wrote: > Last-second re changes don't appear to be going in the right direction > : > > C:\Code\python\PCbuild>python ../lib/test/testre.py > Running retests test suite > testbasicresub (main.ReTests) ... ok > testconstants (main.ReTests) ... ok > testescapedresub (main.ReTests) ... ok > testflags (main.ReTests) ... ok > testlimitations (main.ReTests) ... ERROR > testpickling (main.ReTests) ... ok > testqualifiedresplit (main.ReTests) ... ok > testqualifiedresub (main.ReTests) ... ok > testreescape (main.ReTests) ... ok > testrefindall (main.ReTests) ... ok > testrematch (main.ReTests) ... ok > testresplit (main.ReTests) ... ok > testresubn (main.ReTests) ... ok > testsearchstarplus (main.ReTests) ... ok > testsymbolicrefs (main.ReTests) ... ok > > ====================================================================== > ERROR: testlimitations (main.ReTests) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "../lib/test/testre.py", line 182, in testlimitations > self.assertEqual(re.match('(x)', 50000'x').span(), (0, 50000)) > File "C:\Code\python\lib\sre.py", line 132, in match > return compile(pattern, flags).match(string) > RuntimeError: maximum recursion limit exceeded
Today's change to testre (rather than a change to any of the sre code) is the problem. It appears the Skip was attempting to translate the tests to use the unittest module. One test (and perhaps others) were translated incorrectly.
The original test was: try: verify(re.match('(x)', 50000'x').span() == (0, 50000)) except RuntimeError, v: print v Since this is supposed to cause a RuntimeError, it should be translated something like self.assertRaises(RuntimeError, re.match, '(x)', 50000'x') but definitely not as self.assertEqual(re.match('(x)', 50000'x').span(), (0, 50000)) Here's the CVS log entry: ---------------------------- revision 1.34 date: 2003/04/24 19:43:18; author: montanaro; state: Exp; lines: +294 -371 first cut at unittest version of re tests ---------------------------- Gary Herron
Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev
- Previous message: [Python-Dev] New test failure on Windows
- Next message: [Python-Dev] New test failure on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]