~ubuntu-branches/ubuntu/gutsy/bzr/gutsy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Etienne Goyer
  • Date: 2007-04-27 17:53:49 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20070427175349-rvowqx994rfuikuu
Tags: 0.16~rc1-0ubuntu1
New upstream development release 

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
 
213
213
class TestInventory(TestCaseWithTree):
214
214
 
215
 
    def setUp(self):
216
 
        super(TestInventory, self).setUp()
 
215
    def _set_up(self):
217
216
        self.tree = self.get_tree_with_subdirs_and_all_content_types()
218
217
        self.tree.lock_read()
219
218
        self.addCleanup(self.tree.unlock)
221
220
        self.inv = self.tree.inventory
222
221
 
223
222
    def test_symlink_target(self):
 
223
        if not has_symlinks():
 
224
            raise TestSkipped('No symlink support')
 
225
        self._set_up()
224
226
        if isinstance(self.tree, MutableTree):
225
227
            raise TestSkipped(
226
228
                'symlinks not accurately represented in working trees')
228
230
        self.assertEqual(entry.symlink_target, 'link-target')
229
231
 
230
232
    def test_symlink(self):
 
233
        if not has_symlinks():
 
234
            raise TestSkipped('No symlink support')
 
235
        self._set_up()
231
236
        entry = self.inv[self.inv.path2id('symlink')]
232
237
        self.assertEqual(entry.kind, 'symlink')
233
238
        self.assertEqual(None, entry.text_size)