test isolation: default ignores & repository acquisition

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Sep 23 09:42:07 BST 2009


>>>>> "jam" == John Arbash Meinel <john at arbash-meinel.com> writes:

<snip/>

    jam> Now, I've written some code that points to the benefit
    jam> of 'make_*' style set up. I'd love for you to give me an
    jam> example where you feel 'setUp()' plus inheritance is
    jam> better, so that I have a feel for when to use it.

I think *both* should be used, they serve different purposes but
I have the feeling that writing more classes is viewed as a
constraint when I think it frees me from many problems.

And inheritance can be used only once, so we have to carefully
chose which use :D Parametrization, mixins are ways to somehow
delay that choice.

So for some examples:

bzrlib/tests/test_http.py:

If you look at the history, you'll see that I went from
inheritance to parametrization after some trying with mixins
(which may apply to your examples too).



More information about the bazaar mailing list