What is per_inventory supposed to test
Robert Collins
robertc at robertcollins.net
Thu Sep 24 22:40:59 BST 2009
On Thu, 2009-09-24 at 13:15 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> So I've been looking at working on:
> https://bugs.edge.launchpad.net/bzr/+bug/374730
> (log dir is slow in development-rich-root)
>
> And my first pass at it, is to improve the 'Inventory.filter()' command.
> Right now it is always built on 'iter_entries()' which requires walking
> all content, even though we only need a subset. (The final change will
> probably be higher, but I figured this should be better, too.)
>
> Anyway, I've implemented some of it, but figured it should be tested,
> and 'per_inventory' seemed like the right place.
>
> However, the first thing I noticed was that "per_inventory" only tests
> plain Inventory objects. (It has a list of 1 scenario.)
>
> When I went to update that, I found that CHKInventory doesn't act much
> like Inventory for many operations.
Right. I consider per_inventory more a 'per_in_memory_inventory' test
suite. test_inv has permutation tests for mutating operations via
apply_delta, and other query methods that all inventories have to
implement.
> But it also ended up meaning that I need to move a bunch of tests out of
> per_inventory/basics.py into 'test_inv.py' since stuff like 'add_path()'
> will probably never be implemented.
>
> Does that seem reasonable?
I'd probably have done it the other way around. Or perhaps delete
per_inventory altogether in favour of inline parameterisation in
test_inv.
-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090925/f55a2cde/attachment-0002.pgp
More information about the bazaar
mailing list