~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from bzrlib.inventory import Inventory, ROOT_ID
25
25
import bzrlib.inventory as inventory
26
26
from bzrlib.osutils import has_symlinks, rename
27
 
from bzrlib.selftest import TestCase, TestCaseInTempDir
 
27
from bzrlib.tests import TestCase, TestCaseInTempDir
28
28
 
29
29
 
30
30
class TestInventory(TestCase):
137
137
 
138
138
    def setUp(self):
139
139
        super(TestEntryDiffing, self).setUp()
140
 
        self.branch = Branch.initialize('.')
 
140
        self.branch = Branch.initialize(u'.')
141
141
        self.wt = self.branch.working_tree()
142
142
        print >> open('file', 'wb'), 'foo'
143
 
        self.branch.add(['file'], ['fileid'])
 
143
        self.branch.working_tree().add(['file'], ['fileid'])
144
144
        if has_symlinks():
145
145
            os.symlink('target1', 'symlink')
146
 
            self.branch.add(['symlink'], ['linkid'])
 
146
            self.branch.working_tree().add(['symlink'], ['linkid'])
147
147
        self.wt.commit('message_1', rev_id = '1')
148
148
        print >> open('file', 'wb'), 'bar'
149
149
        if has_symlinks():
240
240
        # to change, and then test merge patterns
241
241
        # with fake parent entries.
242
242
        super(TestSnapshot, self).setUp()
243
 
        self.branch = Branch.initialize('.')
244
 
        self.build_tree(['subdir/', 'subdir/file'])
245
 
        self.branch.add(['subdir', 'subdir/file'], ['dirid', 'fileid'])
 
243
        self.branch = Branch.initialize(u'.')
 
244
        self.build_tree(['subdir/', 'subdir/file'], line_endings='binary')
 
245
        self.branch.working_tree().add(['subdir', 'subdir/file'],
 
246
                                       ['dirid', 'fileid'])
246
247
        if has_symlinks():
247
248
            pass
248
249
        self.wt = self.branch.working_tree()
326
327
        #   a descendent of the other. (B, D)
327
328
        super(TestPreviousHeads, self).setUp()
328
329
        self.build_tree(['file'])
329
 
        self.branch = Branch.initialize('.')
 
330
        self.branch = Branch.initialize(u'.')
330
331
        self.wt = self.branch.working_tree()
331
332
        self.wt.commit('new branch', allow_pointless=True, rev_id='A')
332
333
        self.inv_A = self.branch.get_inventory('A')
333
 
        self.branch.add(['file'], ['fileid'])
 
334
        self.branch.working_tree().add(['file'], ['fileid'])
334
335
        self.wt.commit('add file', rev_id='B')
335
336
        self.inv_B = self.branch.get_inventory('B')
336
337
        self.branch.put_controlfile('revision-history', 'A\n')