[RFC][PATCH]
John Arbash Meinel
john at arbash-meinel.com
Thu Jan 5 17:01:52 GMT 2006
Robert Collins wrote:
> On Wed, 2006-01-04 at 00:03 -0600, John A Meinel wrote:
>
...
>>Can you reexplain why you prefer to Adapt rather than Mixin?
>
>
> several reasons. One is that multiple inheritance is harder than single
> inheritance (not a LOT harder, but enough harder). The second is that
> this is the first half of a two-step change. The second step is to use
> the same infrastructure to allow running all of the tests across the
> board to use one of the servers in the permutations list. I.e. run all
> the tests with sftp as the access mechanism for branch & repository, or
> a memorytransport or .... Thirdly there is less dead chicken code here -
> we have one set of code to setup a style of server, one to test a
> transport class, server pair, and one to tie them together. Before we
> had the server setup and the test logic conflated, which lead to IMO
> nasty hierarchies as we can see elsewhere where we have mixins:
> TestMixin
> ->ExtendedTestMixin
> ->ConcreteTest(TestCase, ExtendedTestMixin, OtherTests)
>
> Ewww!
Oh, and one other thing. For me, the sftp w/ server tests each take
around 1.5s even if they only do something trivial. I noticed that you
test adapter runs a function sequentially, so it run
(test_put(LocalTransport), test_put(SftpTranport), ...).
If you can make the adapter track resources and instantiate the sftp
server for all tests rather than recreating it each time, I'll give you
a +2. :) 10 tests = 15s just spawning the sftp server.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060105/f9dc7a8a/attachment.pgp
More information about the bazaar
mailing list