[RFC] Multipart support for _urllib_
michael at ellerman.id.au
Wed Jun 21 07:27:48 BST 2006
On 6/21/06, Martin Pool <mbp at canonical.com> wrote:
> On 21 Jun 2006, Michael Ellerman <michael at ellerman.id.au> wrote:
> > On 6/21/06, Martin Pool <mbp at canonical.com> wrote:
> > >> Well, that shouldn't be too bad. How much testing do you want in place
> > >> before it is considered worthy of merging? (I would like to get some
> > >> testing as well, but I have some other major focuses this week, and
> > >> would like to see it merged soonish).
> > >
> > >Well, what I would *really* like is to encourage bzr developers to get
> > >to into the habit of test-driven development; writing things as you go
> > >along. One thing I've learnt is that if you leave tests until later it
> > >just gets harder to add them.
> > Oh but I did use TDD, the test was "can I branch bzr.dev" ;)
> Right! So the thing is to ask "now, rather than making this a once-off
> manual test, how can I make it into a reproducible test." There is a
> knack to it which I am still learning, and in some cases the
> infrastructure is all there, but when it does work it pays off well.
> > Point taken, and I actually did look into writing tests first, but I
> > really don't grok the testing infrastructure very well, and then
> > people started getting impatient so I just got it working. I don't
> > expect you to merge it without tests.
> Well, I don't want to have it languish unmerged and untested either. So
> what can we do to help you grok the infrastructure or the right style of
> test to write? (Maybe something to go into HACKING?)
Sure. I'm upgrading my folks computer to dapper tonight, which should
give me a few hours of sitting around watching apt-get, so I should be
able to at least get started on some tests.
Well in general the testing stuff is great, so I don't want to sound
like I'm whinging. But ..
I guess the first hurdle is working out _where_ to put the test, and
if there's already a test for the code you're looking at. AFAICT
there's no systematic linkage between tests and the code that's being
tested. That would help, eg. if every method had a comment that said
"tested by bzrlib/tests/test_foo.py:TestWhatever.test_something()".
Although I guess in practice it's not always clear, and for blackbox
tests you actually don't really care what gets tested, jus t that it
Secondly there's no documentation (AFAIK) on how best to write the
actual tests. It's reasonably easy to work out by cribbing from other
tests, but sometimes it's not clear.
More information about the bazaar