/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/tree_implementations/test_inv.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-08 07:05:00 UTC
  • mfrom: (3376.2.15 no-asserts)
  • Revision ID: pqm@pqm.ubuntu.com-20080508070500-9zyyvsk0eev20t4w
(mbp) remove and disallow assert statements

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    return tree.iter_entries_by_dir([file_id]).next()[1]
34
34
 
35
35
 
36
 
class TestEntryDiffing(TestCaseWithTree):
37
 
 
38
 
    def setUp(self):
39
 
        super(TestEntryDiffing, self).setUp()
40
 
        self.wt = self.make_branch_and_tree('.')
41
 
        self.branch = self.wt.branch
42
 
        open('file', 'wb').write('foo\n')
43
 
        open('binfile', 'wb').write('foo\n')
44
 
        self.wt.add(['file'], ['fileid'])
45
 
        self.wt.add(['binfile'], ['binfileid'])
46
 
        if has_symlinks():
47
 
            os.symlink('target1', 'symlink')
48
 
            self.wt.add(['symlink'], ['linkid'])
49
 
        self.wt.commit('message_1', rev_id = '1')
50
 
        open('file', 'wb').write('bar\n')
51
 
        open('binfile', 'wb').write('x' * 1023 + '\x00\n')
52
 
        if has_symlinks():
53
 
            os.unlink('symlink')
54
 
            os.symlink('target2', 'symlink')
55
 
        self.tree_1 = self.branch.repository.revision_tree('1')
56
 
        self.inv_1 = self.branch.repository.get_inventory('1')
57
 
        self.file_1 = self.inv_1['fileid']
58
 
        self.file_1b = self.inv_1['binfileid']
59
 
        self.tree_2 = self.workingtree_to_test_tree(self.wt)
60
 
        self.tree_2.lock_read()
61
 
        self.addCleanup(self.tree_2.unlock)
62
 
        self.file_2 = get_entry(self.tree_2, 'fileid')
63
 
        self.file_2b = get_entry(self.tree_2, 'binfileid')
64
 
        if has_symlinks():
65
 
            self.link_1 = self.inv_1['linkid']
66
 
            self.link_2 = get_entry(self.tree_2, 'linkid')
67
 
 
68
 
 
69
36
class TestPreviousHeads(TestCaseWithTree):
70
37
 
71
38
    def setUp(self):