On Fri, 10 Oct 2008 01:39:52 -0700, Aaron DeVore <aaron.devore@gmail.com> wrote:
I am working on completing the patch for ticket #3384 (HTTPClientFactory should follow relative redirects). The actual code is complete but the tests are not. I need some input as to how many tests I should write. If I write a test for every possible case I would have about 10 new tests and 40 new lines of code.
The tests would be a mix of the following: - Absolute path (starts at the root directory on the server) versus relative path (starts at the current directory) - With(out) a trailing slash in factory.url - With(out) non-path component (a mix of param, query, and fragment as returned by urlparse.urlparse)
Should I be this thorough?
Yep. If there's a case that the tests don't cover, how will we know if it works right or not? :) Jean-Paul