Tests in #3384 fix
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? -Aaron
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
Okay, can do. I wanted to avoid that much extra code (and possible bugs) but high quality does take priority... -Aaron On Fri, Oct 10, 2008 at 5:21 AM, Jean-Paul Calderone <exarkun@divmod.com> wrote:
Yep. If there's a case that the tests don't cover, how will we know if it works right or not? :)
Jean-Paul
participants (2)
-
Aaron DeVore
-
Jean-Paul Calderone