[MERGE] Add PreviewTree to tree_implementation tests
aaron at aaronbentley.com
Mon Apr 14 15:09:36 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Andrew Bennetts wrote:
> More fundamentally, I don't understand from your description why the current
> test_inv can't simply be replaced by your test_inv_alternatives — if the
> interface doesn't require an inventory attribute to exist on tree
> implementations, and we can do all the tests we want to do without one, why do
> we need seperate tests that use an inventory attribute?
We can't deprecate inventory attributes yet, but I was handling these
inventory tests the same way we handle tests of deprecated APIs.
Preserve them so that existing functionality doesn't change. Add new
tests of new functionality.
Now admittedly, most of the code is the same. But the test for symlink
targets is different, and that did cause me to tweak the WorkingTree
So, I dunno.
I guess we can just test that Tree.inventory works, and just switch
the rest of the tests to use Tree.iter_entries_by_dir() instead.
But the new symlink test tests different interfaces, so I would keep that.
> I don't much like the duplication of test code here. It's a big
> problem. At a minimum this sort of thing needs big, unmissable
comments in the
> docstrings of the two modules saying there's another module that MUST
be kept in
I didn't intend for them to be kept in sync. I intended for the
inventory tests to be preserved as is until such time as the .inventory
attribute was removed.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar