Esempio n. 1
0
 def testCopyUserModeToGroup(self):
     with temporaryPath() as path:
         for initialMode, expectedMode in self.modesList:
             os.chmod(path, initialMode)
             fileUtils.copyUserModeToGroup(path)
             self.assertEquals(os.stat(path).st_mode & self.MODE_MASK,
                               expectedMode)
Esempio n. 2
0
 def testCopyUserModeToGroup(self):
     with temporaryPath() as path:
         for initialMode, expectedMode in self.modesList:
             os.chmod(path, initialMode)
             fileUtils.copyUserModeToGroup(path)
             self.assertEquals(os.stat(path).st_mode & self.MODE_MASK,
                               expectedMode)
Esempio n. 3
0
 def testCopyUserModeToGroup(self):
     fd, path = tempfile.mkstemp()
     try:
         os.close(fd)
         for initialMode, expectedMode in self.modesList:
             os.chmod(path, initialMode)
             fileUtils.copyUserModeToGroup(path)
             self.assertEquals(
                 os.stat(path).st_mode & self.MODE_MASK, expectedMode)
     finally:
         os.unlink(path)
Esempio n. 4
0
 def testCopyUserModeToGroup(self):
     fd, path = tempfile.mkstemp()
     try:
         os.close(fd)
         for initialMode, expectedMode in self.modesList:
             os.chmod(path, initialMode)
             fileUtils.copyUserModeToGroup(path)
             self.assertEquals(os.stat(path).st_mode & self.MODE_MASK,
                               expectedMode)
     finally:
         os.unlink(path)