~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_parents.py

  • Committer: Martin Pool
  • Date: 2011-06-14 01:26:41 UTC
  • mto: (6034.2.1 integration)
  • mto: This revision was merged to the branch mainline in revision 6043.
  • Revision ID: mbp@canonical.com-20110614012641-dnb69zb57ae5je4w
Move all test features into bzrlib.tests.features

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    )
34
34
from bzrlib.revisiontree import InventoryRevisionTree
35
35
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
 
36
from bzrlib.tests import (
 
37
    features,
 
38
    )
36
39
from bzrlib.uncommit import uncommit
37
40
 
38
41
 
228
231
 
229
232
    def test_unicode_symlink(self):
230
233
        # this tests bug #272444
231
 
        self.requireFeature(tests.SymlinkFeature)
232
 
        self.requireFeature(tests.UnicodeFilenameFeature)
 
234
        self.requireFeature(features.SymlinkFeature)
 
235
        self.requireFeature(features.UnicodeFilenameFeature)
233
236
 
234
237
        tree = self.make_branch_and_tree('tree1')
235
238
 
239
242
        target = u'\u03a9'
240
243
        link_name = u'\N{Euro Sign}link'
241
244
        os.symlink(target, 'tree1/' + link_name)
242
 
        tree.add([link_name],['link-id'])
 
245
        tree.add([link_name], ['link-id'])
243
246
 
244
247
        revision1 = tree.commit('added a link to a Unicode target')
245
248
        revision2 = tree.commit('this revision will be discarded')
476
479
 
477
480
    def test_no_parents_just_root(self):
478
481
        """Test doing an empty commit - no parent, set a root only."""
479
 
        basis_shape = Inventory(root_id=None) # empty tree
480
 
        new_shape = Inventory() # tree with a root
 
482
        basis_shape = Inventory(root_id=None)  # empty tree
 
483
        new_shape = Inventory()  # tree with a root
481
484
        self.assertTransitionFromBasisToShape(basis_shape, None, new_shape,
482
485
            'new_parent')
483
486
 
528
531
        def do_file(inv, revid):
529
532
            self.add_file(inv, revid, 'path-id', 'root-id', 'path', '1' * 32,
530
533
                12)
 
534
 
531
535
        def do_link(inv, revid):
532
536
            self.add_link(inv, revid, 'path-id', 'root-id', 'path', 'target')
 
537
 
533
538
        def do_dir(inv, revid):
534
539
            self.add_dir(inv, revid, 'path-id', 'root-id', 'path')
 
540
 
535
541
        for old_factory in (do_file, do_link, do_dir):
536
542
            for new_factory in (do_file, do_link, do_dir):
537
543
                if old_factory == new_factory: