~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-01 23:52:16 UTC
  • mto: (1185.50.19 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1532.
  • Revision ID: john@arbash-meinel.com-20051201235216-50aa021d8ed62620
Some corrections using the new osutils.rename. **ALL TESTS PASS**

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bzrlib.errors import NotBranchError, NotVersionedError
21
21
from bzrlib.tests import TestCaseInTempDir
22
22
from bzrlib.trace import mutter
23
 
from bzrlib.osutils import pathjoin, getcwd
 
23
from bzrlib.osutils import pathjoin, getcwd, has_symlinks
24
24
from bzrlib.workingtree import (TreeEntry, TreeDirectory, TreeFile, TreeLink,
25
25
                                WorkingTree)
26
26
 
54
54
        branch = Branch.initialize(u'.')
55
55
        os.mkdir('dir')
56
56
        print >> open('file', 'w'), "content"
57
 
        os.symlink('target', 'symlink')
 
57
        if has_symlinks():
 
58
            os.symlink('target', 'symlink')
58
59
        tree = branch.working_tree()
59
60
        files = list(tree.list_files())
60
61
        self.assertEqual(files[0], ('dir', '?', 'directory', None, TreeDirectory()))
61
62
        self.assertEqual(files[1], ('file', '?', 'file', None, TreeFile()))
62
 
        self.assertEqual(files[2], ('symlink', '?', 'symlink', None, TreeLink()))
 
63
        if has_symlinks():
 
64
            self.assertEqual(files[2], ('symlink', '?', 'symlink', None, TreeLink()))
63
65
 
64
66
    def test_open_containing(self):
65
67
        branch = Branch.initialize(u'.')