~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-22 05:13:12 UTC
  • mfrom: (2027.1.2 revert-subpath-56549)
  • Revision ID: pqm@pqm.ubuntu.com-20060922051312-035df0d41ab950f1
(abentley) Another test for TreeTransform.create_file()

Show diffs side-by-side

added added

removed removed

Lines of Context:
540
540
        self.assertTrue(wt.is_executable('soc'))
541
541
        self.assertTrue(wt.is_executable('sac'))
542
542
 
 
543
    def test_preserve_mode(self):
 
544
        """File mode is preserved when replacing content"""
 
545
        if sys.platform == 'win32':
 
546
            raise TestSkipped('chmod has no effect on win32')
 
547
        transform, root = self.get_transform()
 
548
        transform.new_file('file1', root, 'contents', 'file1-id', True)
 
549
        transform.apply()
 
550
        self.assertTrue(self.wt.is_executable('file1-id'))
 
551
        transform, root = self.get_transform()
 
552
        file1_id = transform.trans_id_tree_file_id('file1-id')
 
553
        transform.delete_contents(file1_id)
 
554
        transform.create_file('contents2', file1_id)
 
555
        transform.apply()
 
556
        self.assertTrue(self.wt.is_executable('file1-id'))
 
557
 
543
558
    def test__set_mode_stats_correctly(self):
544
559
        """_set_mode stats to determine file mode."""
545
560
        if sys.platform == 'win32':