Exemplo n.º 1
0
 def testSetReadOnlyFalse(self):
     """Test that a readonly file can be made writeable."""
     osutils.set_readonly(self.readonly, False)
     self.assertTrue(os.access(self.readonly, os.W_OK))
Exemplo n.º 2
0
 def CreateFile(self, readonlystate):
     p = osutils.mktemp('readonlystate_%s' % readonlystate)
     osutils.set_readonly(p, readonlystate)
     self._files.append(p)
     return p
Exemplo n.º 3
0
 def testSetReadOnlyTrue(self):
     """Test that a writeable file can be made read only."""
     osutils.set_readonly(self.writeable, True)
     self.assertFalse(os.access(self.writeable, os.W_OK))
Exemplo n.º 4
0
 def tearDown(self):
     map(lambda p: osutils.set_readonly(p, False), self._files)
     map(os.remove, self._files)