~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Packman
  • Date: 2012-01-05 10:44:12 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6427.
  • Revision ID: martin.packman@canonical.com-20120105104412-z03fi9m43h946fvs
Merge bzr.dev to resolve conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
960
960
        tree = tree.bzrdir.open_workingtree()
961
961
        self.assertFalse(tree.case_sensitive)
962
962
 
 
963
    def test_supports_executable(self):
 
964
        self.build_tree(['filename'])
 
965
        tree = self.make_branch_and_tree('.')
 
966
        tree.add('filename')
 
967
        self.assertIsInstance(tree._supports_executable(), bool)
 
968
        if tree._supports_executable():
 
969
            tree.lock_read()
 
970
            try:
 
971
                self.assertFalse(tree.is_executable(tree.path2id('filename')))
 
972
            finally:
 
973
                tree.unlock()
 
974
            os.chmod('filename', 0755)
 
975
            self.addCleanup(tree.lock_read().unlock)
 
976
            self.assertTrue(tree.is_executable(tree.path2id('filename')))
 
977
        else:
 
978
            self.addCleanup(tree.lock_read().unlock)
 
979
            self.assertFalse(tree.is_executable(tree.path2id('filename')))
 
980
 
963
981
    def test_all_file_ids_with_missing(self):
964
982
        tree = self.make_branch_and_tree('tree')
965
983
        tree.lock_write()