[Python-Dev] add a bunch of tests to test_urlparse (original) (raw)
Guido van Rossum guido@python.org
Mon, 18 Mar 2002 09:40:26 -0500
- Previous message: [Python-Dev] add a bunch of tests to test_urlparse
- Next message: [Python-Dev] Re: Activating pymalloc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bug 450225 references a bunch of URL parsing tests based on RFC 2396. I've added them to testurlparse.py. The problem is, two of them fail. Should I
* check in testurlparse.py & create an output/testurlparse that reflects those two errors
Definitely not; it's too easy to forget about it.
* check in testurlparse.py & create an output/testurlparse that reflects how those two problematic URLs ought to be parsed
Only if you plan to check in a fix to urlparse.py ASAP.
* comment out those two failing tests, and generate a 0-error output/testurlparse file
Possibly, if you don't have time to work on a fix right away.
* do nothing
Personally, I think the best solution is to post a bug report to SF quoting the two tests, and leave them out of the test suite unless you have a fix.
Those two failing tests are:
urljoin('http://a/b/c/d;p?q', '?y') expected 'http://a/b/c/?y', got 'http://a/b/c/d;p?y' urljoin('http://a/b/c/d;p?q', ';x') expected 'http://a/b/c/;x', got 'http://a/b/c/d;x' Finally, this uses the old test format. Since so much of the test script gets touched, should I go ahead and convert to unittest?
That's an entirely different question. If you feel like it, go ahead. (Obviously the asserts given on SF are useless.)
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] add a bunch of tests to test_urlparse
- Next message: [Python-Dev] Re: Activating pymalloc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]