Merge lp:~jelmer/bzr-builddeb/fix-check-tree-shape into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Approved by: James Westby
Approved revision: 556
Merged at revision: 557
Proposed branch: lp:~jelmer/bzr-builddeb/fix-check-tree-shape
Merge into: lp:bzr-builddeb
Diff against target: 19 lines (+6/-2)
1 file modified
tests/blackbox/test_import_dsc.py (+6/-2)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/fix-check-tree-shape
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+59947@code.launchpad.net

Description of the change

Cope with check_inventory_shape() being renamed to check_tree_shape()
in newer versions of bzr.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/blackbox/test_import_dsc.py'
2--- tests/blackbox/test_import_dsc.py 2010-05-28 00:36:04 +0000
3+++ tests/blackbox/test_import_dsc.py 2011-05-04 15:12:30 +0000
4@@ -101,9 +101,13 @@
5 tree = self.make_branch_and_tree('.')
6 self.run_bzr('import-dsc %s' % self.dsc_name)
7 tree.lock_read()
8+ expected_shape = ['README', 'debian/', 'debian/changelog',
9+ 'debian/control']
10 try:
11- self.check_inventory_shape(tree.inventory,
12- ['README', 'debian/', 'debian/changelog', 'debian/control'])
13+ if getattr(self, "check_tree_shape", None):
14+ self.check_tree_shape(tree, expected_shape)
15+ else:
16+ self.check_inventory_shape(tree.inventory, expected_shape)
17 finally:
18 tree.unlock()
19 self.assertEqual(len(tree.branch.revision_history()), 2)

Subscribers

People subscribed via source and target branches