~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Marien Zwart
  • Date: 2007-03-12 03:31:12 UTC
  • mto: (2348.1.1 mz.symlinks)
  • mto: This revision was merged to the branch mainline in revision 2349.
  • Revision ID: marienz@gentoo.org-20070312033112-q8h6b0wwzc7ew4d8
More tests for symlinks in tree inventories.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from bzrlib import (
18
18
    errors,
19
19
    tests,
20
 
    mutabletree,
21
20
    )
22
21
from bzrlib.tests import TestSkipped
23
22
from bzrlib.tests.tree_implementations import TestCaseWithTree
92
91
            self.assertRaises(errors.NoSuchId, tree.id2path, 'a')
93
92
        finally:
94
93
            tree.unlock()
95
 
 
96
 
 
97
 
class TestInventory(TestCaseWithTree):
98
 
 
99
 
    def test_symlink(self):
100
 
        tree = self.get_tree_with_subdirs_and_all_content_types()
101
 
        if isinstance(tree, mutabletree.MutableTree):
102
 
            raise TestSkipped(
103
 
                'symlinks not accurately represented in working trees')
104
 
        tree.lock_read()
105
 
        self.addCleanup(tree.unlock)
106
 
        inv = tree.inventory
107
 
        entry = inv[inv.path2id('symlink')]
108
 
        self.assertEqual(entry.kind, 'symlink')
109
 
        self.assertEqual(entry.symlink_target, 'link-target')