Rev 5792: Clean up some of the old tests that I had updated. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-wt-inventory-tree-reference-764677
John Arbash Meinel
john at arbash-meinel.com
Mon May 9 14:10:05 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.4-wt-inventory-tree-reference-764677
------------------------------------------------------------
revno: 5792
revision-id: john at arbash-meinel.com-20110509140952-4ek264yk53pz23q2
parent: john at arbash-meinel.com-20110509135143-9o1gtycdhmd29ayj
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-wt-inventory-tree-reference-764677
timestamp: Mon 2011-05-09 16:09:52 +0200
message:
Clean up some of the old tests that I had updated.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_workingtree/test_inv.py'
--- a/bzrlib/tests/per_workingtree/test_inv.py 2011-05-06 14:53:40 +0000
+++ b/bzrlib/tests/per_workingtree/test_inv.py 2011-05-09 14:09:52 +0000
@@ -157,13 +157,17 @@
def test_tree_reference_matches_inv(self):
base = self.make_branch_and_tree('base')
+ if not base.supports_tree_reference():
+ raise tests.TestNotApplicable("wt doesn't support nested trees")
+ # We add it as a directory, but it becomes a tree-reference
+ base.add(['subdir'], ['subdir-id'], ['directory'])
subdir = self.make_branch_and_tree('base/subdir')
- if not base._directory_is_tree_reference('subdir'):
- raise tests.TestNotApplicable("wt doesn't support nested trees")
- base.add(['subdir'], ['subdir-id'])
self.addCleanup(base.lock_read().unlock)
+ # Note: we aren't strict about ie.kind being 'directory' here, what we
+ # are strict about is that wt.inventory should match
+ # wt.current_dirstate()'s idea about what files are where.
ie = base.inventory['subdir-id']
- self.assertEqual('tree-reference', ie.kind)
+ self.assertEqual('directory', ie.kind)
path, ie = base.iter_entries_by_dir(['subdir-id']).next()
self.assertEqual('subdir', path)
self.assertEqual('tree-reference', ie.kind)
=== modified file 'bzrlib/tests/per_workingtree/test_nested_specifics.py'
--- a/bzrlib/tests/per_workingtree/test_nested_specifics.py 2011-05-06 14:53:40 +0000
+++ b/bzrlib/tests/per_workingtree/test_nested_specifics.py 2011-05-09 14:09:52 +0000
@@ -73,10 +73,10 @@
self.assertEqual('directory',
tree._comparison_data(ie, 'subtree')[0])
- def test_inventory_autodetects_subtree(self):
+ def test_inventory_does_not_autodetect_subtree(self):
tree = self.prepare_with_subtree()
ie = tree.inventory['subtree-id']
- self.assertEqual('tree-reference', ie.kind)
+ self.assertEqual('directory', ie.kind)
def test_iter_entries_by_dir_autodetects_subtree(self):
tree = self.prepare_with_subtree()
More information about the bazaar-commits
mailing list